diff --git a/go.mod b/go.mod index 4e60085c2..5514a520b 100644 --- a/go.mod +++ b/go.mod @@ -17,12 +17,13 @@ require ( github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 // indirect - github.com/aws/aws-sdk-go v1.15.55 + github.com/aws/aws-sdk-go v1.16.4 github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.0.0-20161015143505-675b82c74c0e // indirect github.com/blang/semver v0.0.0-20170202183821-4a1e882c79dc github.com/boltdb/bolt v1.3.1 // indirect + github.com/boombuler/barcode v1.0.0 // indirect github.com/chzyer/logex v1.1.10 // indirect github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 // indirect @@ -78,7 +79,6 @@ require ( github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb // indirect github.com/hashicorp/vault v0.0.0-20161029210149-9a60bf2a50e4 github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a // indirect - github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 // indirect github.com/jonboulle/clockwork v0.1.0 // indirect github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 github.com/jtolds/gls v4.2.1+incompatible // indirect @@ -109,6 +109,7 @@ require ( github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17 // indirect github.com/posener/complete v0.0.0-20171219111128-6bee943216c8 + github.com/pquerna/otp v1.0.0 // indirect github.com/satori/go.uuid v0.0.0-20160927100844-b061729afc07 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect github.com/sirupsen/logrus v1.1.1 // indirect @@ -116,7 +117,7 @@ require ( github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect github.com/soheilhy/cmux v0.1.4 // indirect github.com/spf13/afero v1.0.2 - github.com/terraform-providers/terraform-provider-aws v1.41.0 + github.com/terraform-providers/terraform-provider-aws v1.52.0 github.com/terraform-providers/terraform-provider-openstack v0.0.0-20170616075611-4080a521c6ea github.com/terraform-providers/terraform-provider-template v1.0.0 // indirect github.com/terraform-providers/terraform-provider-tls v1.2.0 // indirect diff --git a/go.sum b/go.sum index 46e187353..56a43ee17 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 h1:MBXhrxjNkjdqJysfNbKMMPFNXlz6EzpOnPcsoYBeD3E= github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.15.55 h1:GHqCuxkZSNKWdubIADOCrZSeg42JxREPnXaoklBg2zg= -github.com/aws/aws-sdk-go v1.15.55/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.16.4 h1:HQaquRQLvsZ8fRBbmFw6/+RJolhtjGMkkB0IhTM+hf8= +github.com/aws/aws-sdk-go v1.16.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1 h1:6fqkBkx5cRbd8Pq0UEMxyteIAPoE1KiPptnx1yEzJLU= github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= @@ -47,6 +47,8 @@ github.com/blang/semver v0.0.0-20170202183821-4a1e882c79dc h1:J/iAaGTCZYfT/allw6 github.com/blang/semver v0.0.0-20170202183821-4a1e882c79dc/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/boombuler/barcode v1.0.0 h1:s1TvRnXwL2xJRaccrdcBQMZxq6X7DvsMogtmJeHDdrc= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -66,8 +68,6 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbp github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v0.0.0-20160617170158-f0777076321a h1:pzKxqfSfp4kqrm6jfyVYYkWhf+e1hPRt3rX+Yj/3UBU= -github.com/dgrijalva/jwt-go v0.0.0-20160617170158-f0777076321a/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dimchansky/utfbom v1.0.0 h1:fGC2kkf4qOoKqZ4q7iIh+Vef4ubC1c38UDsEyZynZPc= @@ -81,8 +81,6 @@ github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08/go.mod h1:VBVDF github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-ini/ini v1.25.4 h1:Mujh4R/dH6YL8bxuISne3xX2+qcQ9p0IxKAP6ExWoUo= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gogo/protobuf v0.0.0-20180821102207-98f6aa8b3bcf h1:0nBDY6WfT0ChlHhvNcGw3BTjyDOtCom2yQTVBJv3MHg= @@ -91,8 +89,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekf github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 h1:u4bArs140e9+AfE52mFHOXVFnOSBJBRlzTHrOPLOIhE= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -123,8 +119,6 @@ github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089/go.mod h1:mFrjN1m github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-azure-helpers v0.0.0-20181122151743-c51a3103be3b h1:AJjRaIeZiWlhYVf2skNYOjooaaIOcQzS94a3iSKnXKE= -github.com/hashicorp/go-azure-helpers v0.0.0-20181122151743-c51a3103be3b/go.mod h1:e+GPy2nvD+spqsdjUyw5tbo73rBbu955QBaV9GZoBEA= github.com/hashicorp/go-azure-helpers v0.0.0-20181126135526-ec113df69f49 h1:jkGYE3AQEm95w4n8o/iR59duXnuSjMCf1MCNSwOJxAw= github.com/hashicorp/go-azure-helpers v0.0.0-20181126135526-ec113df69f49/go.mod h1:Y5ejHZY3jQby82dOASJzyQ2xZw37zs+D5x6AaOC6O5E= github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de h1:XDCSythtg8aWSRSO29uwhgh7b127fWr+m5SemqjSUL8= @@ -143,8 +137,6 @@ github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahL github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v0.0.0-20181205205220-20341d70f4ff h1:z9Nk32P4kDgdYMZU4OGX1Nfpm2q9E++10TSQ6sltD/k= -github.com/hashicorp/go-plugin v0.0.0-20181205205220-20341d70f4ff/go.mod h1:Ft7ju2vWzhO0ETMKUVo12XmXmII6eSUS4rsPTkY/siA= github.com/hashicorp/go-plugin v0.0.0-20181212150838-f444068e8f5a h1:z9eTtDWoxYrJvtAD+xAepmTEfEmYgouWUytJ84UWAr8= github.com/hashicorp/go-plugin v0.0.0-20181212150838-f444068e8f5a/go.mod h1:Ft7ju2vWzhO0ETMKUVo12XmXmII6eSUS4rsPTkY/siA= github.com/hashicorp/go-retryablehttp v0.5.0 h1:aVN0FYnPwAgZI/hVzqwfMiM86ttcHTlQKbBVeVmXPIs= @@ -167,8 +159,6 @@ github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCO github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f h1:UdxlrJz4JOnY8W+DbLISwf2B8WXEolNRA8BGCwI9jws= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= -github.com/hashicorp/hcl2 v0.0.0-20181206005933-df9794be1f23 h1:RcXTRSKSKCJYXxI7yaOwAH1lYfZIzxhQhW2bFC8hABE= -github.com/hashicorp/hcl2 v0.0.0-20181206005933-df9794be1f23/go.mod h1:ShfpTh661oAaxo7VcNxg0zcZW6jvMa7Moy2oFx7e5dE= github.com/hashicorp/hcl2 v0.0.0-20181208003705-670926858200 h1:F/nGtDwtQsuw7ZHmiLpHsPWNljDC24kiSHSGUnou9sw= github.com/hashicorp/hcl2 v0.0.0-20181208003705-670926858200/go.mod h1:ShfpTh661oAaxo7VcNxg0zcZW6jvMa7Moy2oFx7e5dE= github.com/hashicorp/hil v0.0.0-20170627220502-fa9f258a9250 h1:fooK5IvDL/KIsi4LxF/JH68nVdrBSiGNPhS2JAQjtjo= @@ -187,9 +177,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a h1:FyS/ubzBR5xJlnJGRTwe7GUHpJOR4ukYK3y+LFNffuA= github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a/go.mod h1:uoIMjNxUfXi48Ci40IXkPRbghZ1vbti6v9LCbNqRgHY= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 h1:SMvOWPJCES2GdFracYbBQh93GXac8fq7HeN6JnpduB8= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 h1:kie3qOosvRKqwij2HGzXWffwpXvcqfPPXRUw8I4F/mg= @@ -235,8 +224,6 @@ github.com/mitchellh/colorstring v0.0.0-20150917214807-8631ce90f286 h1:KHyL+3mQO github.com/mitchellh/colorstring v0.0.0-20150917214807-8631ce90f286/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v0.0.0-20170525013902-d23ffcb85de3 h1:dECZqiJYhKdj9QlLpiQaRDXHDXRTdiyZI3owdDGhlYY= github.com/mitchellh/copystructure v0.0.0-20170525013902-d23ffcb85de3/go.mod h1:eOsF2yLPlBBJPvD+nhl5QMTBSOBbOph6N7j/IDUw7PY= -github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747 h1:eQox4Rh4ewJF+mqYPxCkmBAirRnPaHEB26UkNuPyjlk= -github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-linereader v0.0.0-20141013185533-07bab5fdd958 h1:wN+5lV34eSnVSZgBLWRGHr6L4giR3/wI2B9DLmVnlfI= @@ -275,6 +262,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v0.0.0-20171219111128-6bee943216c8 h1:lcb1zvdlaZyEbl2OXifN3uOYYyIvllofUbmp9bwbL+0= github.com/posener/complete v0.0.0-20171219111128-6bee943216c8/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/otp v1.0.0 h1:TBZrpfnzVbgmpYhiYBK+bJ4Ig0+ye+GGNMe2pTrvxCo= +github.com/pquerna/otp v1.0.0/go.mod h1:Zad1CMQfSQZI5KLpahDiSUX4tMMREnXw98IvL1nhgMk= github.com/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= @@ -304,8 +293,8 @@ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d h1:Z4EH+5EffvBEhh37F0C0DnpklTMh00JOkjW5zK3ofBI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= -github.com/terraform-providers/terraform-provider-aws v1.41.0 h1:ZOuxMXREOtJ+SHMX5SnbZbiqYhl9GNfZDl4f0H6CaOM= -github.com/terraform-providers/terraform-provider-aws v1.41.0/go.mod h1:uvqaeKnm2ydZ2LuKuW1NDNBu6heC/7IDGXWm36/6oKs= +github.com/terraform-providers/terraform-provider-aws v1.52.0 h1:hfFaKOUtL/ud9Y4PFgFT7F8Ss61lMIK1P+ndPEhPA7s= +github.com/terraform-providers/terraform-provider-aws v1.52.0/go.mod h1:uvqaeKnm2ydZ2LuKuW1NDNBu6heC/7IDGXWm36/6oKs= github.com/terraform-providers/terraform-provider-openstack v0.0.0-20170616075611-4080a521c6ea h1:IfuzHOI3XwwYZS2Xw8SQbxOtGXlIUrKtXtuDCTNxmsQ= github.com/terraform-providers/terraform-provider-openstack v0.0.0-20170616075611-4080a521c6ea/go.mod h1:2aQ6n/BtChAl1y2S60vebhyJyZXBsuAI5G4+lHrT1Ew= github.com/terraform-providers/terraform-provider-template v1.0.0 h1:g2pyFaAJu369iAb7qGWmVwtQ15/35lRAfW91Je8wLjE= 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 b6432f1a1..645df2450 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/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index 58c89fa0d..10634d173 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -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 cfcddf3dc..f8853d78a 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/credentials/chain_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go index f298d6596..3ad1e798d 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 a270844df..dc82f4c3c 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 @@ -64,8 +64,6 @@ import ( // Credentials: credentials.AnonymousCredentials, // }))) // // Access public S3 buckets. -// -// @readonly var AnonymousCredentials = NewStaticCredentials("", "", "") // A Value is the AWS credentials value for individual credential fields. 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 c14231a16..54c5cf733 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 000000000..1980c8c14 --- /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 51e21e0f3..e15514958 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 4f5dab3fc..531139e39 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 000000000..a00ab6c67 --- /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 000000000..d5599188e --- /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 000000000..e414eaace --- /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 000000000..e0b122008 --- /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/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go index 118618442..9a5697c25 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 @@ -227,9 +227,7 @@ func (rep *Reporter) InjectHandlers(handlers *request.Handlers) { apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric} handlers.Complete.PushFrontNamed(apiCallHandler) - handlers.Complete.PushFrontNamed(apiCallAttemptHandler) - - handlers.AfterRetry.PushFrontNamed(apiCallAttemptHandler) + handlers.CompleteAttempt.PushFrontNamed(apiCallAttemptHandler) } // boolIntValue return 1 for true and 0 for false. 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 c04ba06c5..1ddeae101 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 @@ -95,7 +95,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 +108,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) { 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 4bd182ab2..c3bbaa0cd 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{}, @@ -405,6 +286,21 @@ var awsPartition = partition{ "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 +329,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{}, @@ -504,6 +401,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 +433,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 +452,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,6 +500,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{}, @@ -591,6 +508,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -622,6 +540,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 +608,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 +631,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 +711,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 +728,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{}, @@ -823,6 +775,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{}, @@ -880,6 +833,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{}, @@ -947,6 +901,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 +931,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 +963,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 +984,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 +1005,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 +1069,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 +1095,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 +1149,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 +1170,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{}, @@ -1279,6 +1242,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{}, @@ -1416,6 +1380,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1432,6 +1397,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{}, @@ -1471,6 +1437,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{}, @@ -1491,6 +1458,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{}, @@ -1529,6 +1497,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{}, @@ -1591,6 +1560,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{}, @@ -1598,6 +1568,7 @@ var awsPartition = partition{ "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1673,6 +1644,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{}, @@ -1696,12 +1668,24 @@ var awsPartition = partition{ "neptune": service{ Endpoints: endpoints{ + "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{ @@ -1776,7 +1760,9 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "polly": service{ @@ -1809,6 +1795,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{}, @@ -1831,6 +1818,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{}, @@ -1872,6 +1860,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, @@ -1908,11 +1904,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{}, }, }, @@ -1943,6 +1944,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"}, @@ -1975,6 +1977,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"}, @@ -2101,9 +2254,33 @@ 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{ @@ -2187,6 +2364,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{}, @@ -2210,6 +2388,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{}, @@ -2256,6 +2435,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{}, @@ -2276,6 +2456,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{}, "us-east-1": endpoint{}, @@ -2294,6 +2475,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{}, @@ -2319,6 +2501,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{}, @@ -2358,6 +2541,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{}, @@ -2408,6 +2592,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{}, @@ -2428,6 +2613,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{}, @@ -2438,6 +2624,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"}, @@ -2540,8 +2744,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{}, @@ -2658,6 +2864,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "dms": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "ds": service{ Endpoints: endpoints{ @@ -2743,6 +2956,7 @@ var awscnPartition = partition{ "es": service{ Endpoints: endpoints{ + "cn-north-1": endpoint{}, "cn-northwest-1": endpoint{}, }, }, @@ -2815,6 +3029,12 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "polly": service{ + + Endpoints: endpoints{ + "cn-northwest-1": endpoint{}, + }, + }, "rds": service{ Endpoints: endpoints{ @@ -2839,6 +3059,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{ @@ -2941,6 +3183,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)", }, @@ -2948,6 +3193,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{}, }, @@ -2955,26 +3207,36 @@ var awsusgovPartition = partition{ "apigateway": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "application-autoscaling": service{ 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{}, }, }, @@ -2997,36 +3259,54 @@ var awsusgovPartition = partition{ "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{}, }, }, "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", @@ -3039,6 +3319,7 @@ var awsusgovPartition = partition{ "ec2": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3056,12 +3337,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{}, }, }, @@ -3074,18 +3357,21 @@ 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{}, }, }, "elasticloadbalancing": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"http", "https"}, }, @@ -3094,6 +3380,7 @@ var awsusgovPartition = partition{ "elasticmapreduce": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"https"}, }, @@ -3102,23 +3389,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, @@ -3135,6 +3434,7 @@ var awsusgovPartition = partition{ "inspector": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3151,24 +3451,28 @@ 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{}, }, }, @@ -3185,6 +3489,7 @@ var awsusgovPartition = partition{ "monitoring": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3197,12 +3502,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{}, }, }, @@ -3212,6 +3519,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"}, @@ -3223,15 +3536,56 @@ 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{}, }, }, @@ -3244,6 +3598,7 @@ var awsusgovPartition = partition{ "sns": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"http", "https"}, }, @@ -3252,6 +3607,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"}, @@ -3261,12 +3617,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{}, }, }, @@ -3283,6 +3641,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", @@ -3295,18 +3654,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 000000000..000dd79ee --- /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/v3model_codegen.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go index 05e92df22..0fdfcc56e 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 576636168..fa06f7a8f 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 605a72d3c..8ef8548a9 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 75f0fe077..7d87df65c 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 expriation +// 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 +// expriation 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() - } + if err := r.Sign(); err != nil { + debugLogReqError(r, "Sign Request", false, err) + return err } - r.Sign() - if r.Error != nil { - return r.Error - } - - 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) + + if r.Error != nil || !aws.BoolValue(r.Retryable) { return r.Error } - debugLogReqError(r, "Send Request", true, err) + + r.prepareRetry() 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) - return r.Error - } - debugLogReqError(r, "Validate Response", true, err) - 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)) + } - 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) - continue - } + // 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() - break + // 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 + } + + 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 7d5270298..7bc5da782 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 bcfd947a3..8630683f3 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,8 @@ 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. @@ -237,6 +239,29 @@ 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 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 98d420fd6..2a0e882d0 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) }) 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 82e04d76c..c94d0fb9a 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" ) @@ -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 5d7b28950..9bdbafd65 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,6 +14,7 @@ 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" @@ -452,6 +453,14 @@ 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 { @@ -526,6 +535,10 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg share 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 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 565a0b795..7cb44021b 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 ( @@ -26,6 +26,11 @@ const ( // 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. @@ -57,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 @@ -107,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, }) } @@ -180,48 +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() - credentialSource := section.Key(credentialSourceKey).String() + 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, CredentialSource: credentialSource, - ExternalID: section.Key(externalIDKey).String(), - MFASerial: section.Key(mfaSerialKey).String(), - RoleSessionName: section.Key(roleSessionNameKey).String(), + 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 5b52ab221..594db5b17 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{}{}, }, @@ -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: 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 7a7b37f37..2c5130e26 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.55" +const SDKVersion = "1.16.4" 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 000000000..e83a99886 --- /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 000000000..0895d53cb --- /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 000000000..0b76999ba --- /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 000000000..25ce0fe13 --- /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 000000000..04345a54c --- /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 000000000..91ba2a59d --- /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 000000000..8d462f77e --- /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 000000000..3b0ca7afe --- /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 000000000..582c024ad --- /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 000000000..8be520ae6 --- /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 exludes 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 000000000..24df543d3 --- /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 000000000..e52ac399f --- /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 000000000..a45c0bc56 --- /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 000000000..8a84c7cbe --- /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 000000000..457287019 --- /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 000000000..7f01cf7c7 --- /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 000000000..f82095ba2 --- /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 000000000..6bb696447 --- /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 000000000..ba0af01b5 --- /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 defintion. +// +// 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 000000000..305999d29 --- /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 000000000..94841c324 --- /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 000000000..99915f7f7 --- /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 000000000..7ffb4ae06 --- /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/private/protocol/host.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go index f06f44ee1..d7d42db0a 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go @@ -1,7 +1,54 @@ package protocol -// ValidHostLabel returns if the label is a valid RFC 1123 Section 2.1 domain -// host label name. +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 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 000000000..915b0fcaf --- /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/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go index 1bfe45f65..cf981fe95 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 40cb23650..e9c70c771 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 02db27d97..22d62f133 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 @@ -246,8 +246,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 } @@ -833,8 +832,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 } @@ -1223,8 +1221,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 } @@ -1324,8 +1321,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 } @@ -1430,8 +1426,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 } @@ -1534,8 +1529,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 } @@ -1631,8 +1625,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 } 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 6241df605..e2bb14128 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 @@ -56,7 +56,7 @@ func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request // // Create an ApiKey resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/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 @@ -152,7 +152,7 @@ func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req // // Adds a new Authorizer resource to an existing RestApi resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/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 @@ -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 } @@ -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 ([[AwsDocsUrlPrefix]]/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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -3912,7 +3889,7 @@ func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *reque // // Describe an existing Authorizer resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/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 @@ -3997,7 +3974,7 @@ func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *req // // Describe an existing Authorizers resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/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 @@ -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 } @@ -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 ([[AwsDocsUrlPrefix]]/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 @@ -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 } @@ -9568,7 +9543,7 @@ func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req // // Updates an existing Authorizer resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/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 @@ -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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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": "[[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-limits.html)Developer -// Guide ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/welcome.html), -// AWS CLI ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 @@ -12650,7 +12640,7 @@ type CreateModelInput struct { RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` // The schema for the model. For application/json models, this should be JSON - // schema draft 4 ([[JsonSchemaUrl]]) model. + // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. Schema *string `locationName:"schema" type:"string"` } @@ -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,8 +14899,8 @@ 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 ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-deployment.html), -// AWS SDKs ([[AwsAmazonUrlPrefix]]/tools/) +// 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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsAmazonUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway ([[AwsDocsUrlPrefix]]/general/latest/gr/rande.html#apigateway_region). + // 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 (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. @@ -15142,8 +15276,8 @@ type DomainName struct { RegionalDomainName *string `locationName:"regionalDomainName" type:"string"` // The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. - // For more information, see Set up a Regional Custom Domain Name ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway ([[AwsDocsUrlPrefix]]/general/latest/gr/rande.html#apigateway_region). + // 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 (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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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,9 +16294,9 @@ 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 ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-deploy-api.html), -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-deployment.html), -// AWS SDKs ([[AwsAmazonUrlPrefix]]/tools/) +// 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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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,12 +17740,12 @@ func (s *GetModelTemplateInput) SetRestApiId(v string) *GetModelTemplateInput { // Represents a mapping template used to transform a payload. // -// Mapping Templates ([[AwsDocsUrlPrefix]]/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) ([[ApacheVtlUrl]]) template content - // used for the template resource. + // 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 ([[AwsDocsUrlPrefix]]/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 -// ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/getting-started-with-private-integration.html), -// Set up Private Integrations ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), -// documentationpart:import ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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": "[[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", -// "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", -// "name": "integrationresponse", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-{rel}.html", -// "name": "method", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/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() ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/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": "[[AwsDocsUrlPrefix]]/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 - // ([[PetstoreDemoUrl]]) 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": "[[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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"` @@ -20117,11 +20459,11 @@ type Model struct { Name *string `locationName:"name" type:"string"` // The schema for the model. For application/json models, this should be JSON - // schema draft 4 ([[JsonSchemaUrl]]) model. Do not include "\*/" characters - // in the description of any properties because such "\*/" characters may be - // interpreted as the closing marker for comments in some languages, such as - // Java or JavaScript, causing the installation of your API's SDK generated - // by API Gateway to fail. + // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. + // Do not include "\*/" characters in the description of any properties because + // such "\*/" characters may be interpreted as the closing marker for comments + // in some languages, such as Java or JavaScript, causing the installation of + // your API's SDK generated by API Gateway to fail. Schema *string `locationName:"schema" type:"string"` } @@ -20185,7 +20527,7 @@ type PatchOperation struct { // an error message. Op *string `locationName:"op" type:"string" enum:"Op"` - // The op operation's target, as identified by a JSON Pointer ([[JsonPointerRefUrl]]) + // The op operation's target, as identified by a JSON Pointer (https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08) // value that references a location within the targeted resource. For example, // if the target resource has an updateable property of {"name":"value"}, the // path for this property is /name. If the name property value is a JSON object @@ -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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 - // ([[PetstoreDemoUrl]]) 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 ([[AwsDocsUrlPrefix]]/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": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", - // "name": "integrationresponse", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-{rel}.html", - // "name": "method", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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")) } @@ -21819,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 @@ -21883,8 +22294,9 @@ type TestInvokeAuthorizerOutput struct { Authorization map[string][]*string `locationName:"authorization" type:"map"` - // The open identity claims ([[OpenIdClaimsUrl]]), with any supported custom - // attributes, returned from the Cognito Your User Pool configured for the API. + // 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"` // The HTTP status code that the client would have received. Value is 0 if the @@ -22015,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 @@ -22084,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 ([[AwsDocsUrlPrefix]]/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"` @@ -22220,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")) } @@ -22311,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 @@ -22365,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 @@ -22428,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 @@ -22486,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 @@ -22541,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 @@ -22604,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 @@ -22667,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 @@ -22725,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 @@ -22799,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 @@ -22831,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 ([[AwsDocsUrlPrefix]]/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 @@ -22867,7 +23336,7 @@ func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayRespon // \"statusCode\": \"'404'\"\n}" }, "responseType": "MISSING_AUTHENTICATION_TOKEN", // "statusCode": "404" } // -// Customize Gateway Responses ([[AwsDocsUrlPrefix]]/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"` @@ -22991,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 @@ -23073,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 @@ -23159,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 @@ -23241,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 @@ -23322,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 @@ -23385,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 @@ -23415,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 -// ([[AwsDocsUrlPrefix]]/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 -// ([[AwsDocsUrlPrefix]]/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 ([[AwsDocsUrlPrefix]]/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"` @@ -23509,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 @@ -23567,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 @@ -23621,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 @@ -23686,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 @@ -23744,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 @@ -23794,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 @@ -23897,7 +24447,7 @@ func (s *UpdateVpcLinkOutput) SetTargetArns(v []*string) *UpdateVpcLinkOutput { // Represents the usage data of a usage plan. // -// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan ([[AwsDocsUrlPrefix]]/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"` @@ -23967,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 ([[AwsDocsUrlPrefix]]/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"` @@ -24051,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 ([[AwsDocsUrlPrefix]]/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 5df0ddb58..5fa02a90d 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" @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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/appmesh/api.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go new file mode 100644 index 000000000..8f57f4444 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go @@ -0,0 +1,5250 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package appmesh + +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" +) + +const opCreateMesh = "CreateMesh" + +// CreateMeshRequest generates a "aws/request.Request" representing the +// client's request for the CreateMesh operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateMesh for more information on using the CreateMesh +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateMeshRequest method. +// req, resp := client.CreateMeshRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateMesh +func (c *AppMesh) CreateMeshRequest(input *CreateMeshInput) (req *request.Request, output *CreateMeshOutput) { + op := &request.Operation{ + Name: opCreateMesh, + HTTPMethod: "PUT", + HTTPPath: "/meshes", + } + + if input == nil { + input = &CreateMeshInput{} + } + + output = &CreateMeshOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateMesh API operation for AWS App Mesh. +// +// Creates a new service mesh. A service mesh is a logical boundary for network +// traffic between the services that reside within it. +// +// After you create your service mesh, you can create virtual nodes, virtual +// routers, and routes to distribute traffic between the applications in your +// mesh. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation CreateMesh for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeConflictException "ConflictException" +// The request contains a client token that was used for a previous update resource +// call with different specifications. Try the request again with a new client +// token. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have exceeded a service limit for your account. For more information, +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// in the AWS App Mesh User Guide. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateMesh +func (c *AppMesh) CreateMesh(input *CreateMeshInput) (*CreateMeshOutput, error) { + req, out := c.CreateMeshRequest(input) + return out, req.Send() +} + +// CreateMeshWithContext is the same as CreateMesh with the addition of +// the ability to pass a context and additional request options. +// +// See CreateMesh for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) CreateMeshWithContext(ctx aws.Context, input *CreateMeshInput, opts ...request.Option) (*CreateMeshOutput, error) { + req, out := c.CreateMeshRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRoute for more information on using the CreateRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRouteRequest method. +// req, resp := client.CreateRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateRoute +func (c *AppMesh) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) { + op := &request.Operation{ + Name: opCreateRoute, + HTTPMethod: "PUT", + HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes", + } + + if input == nil { + input = &CreateRouteInput{} + } + + output = &CreateRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRoute API operation for AWS App Mesh. +// +// Creates a new route that is associated with a virtual router. +// +// You can use the prefix parameter in your route specification for path-based +// routing of requests. For example, if your virtual router service name is +// my-service.local, and you want the route to match requests to my-service.local/metrics, +// then your prefix should be /metrics. +// +// If your route matches a request, you can distribute traffic to one or more +// target virtual nodes with relative weighting. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation CreateRoute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeConflictException "ConflictException" +// The request contains a client token that was used for a previous update resource +// call with different specifications. Try the request again with a new client +// token. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have exceeded a service limit for your account. For more information, +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// in the AWS App Mesh User Guide. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateRoute +func (c *AppMesh) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) { + req, out := c.CreateRouteRequest(input) + return out, req.Send() +} + +// CreateRouteWithContext is the same as CreateRoute with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) { + req, out := c.CreateRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateVirtualNode = "CreateVirtualNode" + +// CreateVirtualNodeRequest generates a "aws/request.Request" representing the +// client's request for the CreateVirtualNode operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateVirtualNode for more information on using the CreateVirtualNode +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateVirtualNodeRequest method. +// req, resp := client.CreateVirtualNodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualNode +func (c *AppMesh) CreateVirtualNodeRequest(input *CreateVirtualNodeInput) (req *request.Request, output *CreateVirtualNodeOutput) { + op := &request.Operation{ + Name: opCreateVirtualNode, + HTTPMethod: "PUT", + HTTPPath: "/meshes/{meshName}/virtualNodes", + } + + if input == nil { + input = &CreateVirtualNodeInput{} + } + + output = &CreateVirtualNodeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateVirtualNode API operation for AWS App Mesh. +// +// Creates a new virtual node within a service mesh. +// +// A virtual node acts as logical pointer to a particular task group, such as +// an Amazon ECS service or a Kubernetes deployment. When you create a virtual +// node, you must specify the DNS service discovery name for your task group. +// +// Any inbound traffic that your virtual node expects should be specified as +// a listener. Any outbound traffic that your virtual node expects to reach +// should be specified as a backend. +// +// The response metadata for your new virtual node contains the arn that is +// associated with the virtual node. Set this value (either the full ARN or +// the truncated resource name, for example, mesh/default/virtualNode/simpleapp, +// as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's +// Envoy proxy container in your task definition or pod spec. This is then mapped +// to the node.id and node.cluster Envoy parameters. +// +// If you require your Envoy stats or tracing to use a different name, you can +// override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME +// with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation CreateVirtualNode for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeConflictException "ConflictException" +// The request contains a client token that was used for a previous update resource +// call with different specifications. Try the request again with a new client +// token. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have exceeded a service limit for your account. For more information, +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// in the AWS App Mesh User Guide. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualNode +func (c *AppMesh) CreateVirtualNode(input *CreateVirtualNodeInput) (*CreateVirtualNodeOutput, error) { + req, out := c.CreateVirtualNodeRequest(input) + return out, req.Send() +} + +// CreateVirtualNodeWithContext is the same as CreateVirtualNode with the addition of +// the ability to pass a context and additional request options. +// +// See CreateVirtualNode for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) CreateVirtualNodeWithContext(ctx aws.Context, input *CreateVirtualNodeInput, opts ...request.Option) (*CreateVirtualNodeOutput, error) { + req, out := c.CreateVirtualNodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateVirtualRouter = "CreateVirtualRouter" + +// CreateVirtualRouterRequest generates a "aws/request.Request" representing the +// client's request for the CreateVirtualRouter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateVirtualRouter for more information on using the CreateVirtualRouter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateVirtualRouterRequest method. +// req, resp := client.CreateVirtualRouterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualRouter +func (c *AppMesh) CreateVirtualRouterRequest(input *CreateVirtualRouterInput) (req *request.Request, output *CreateVirtualRouterOutput) { + op := &request.Operation{ + Name: opCreateVirtualRouter, + HTTPMethod: "PUT", + HTTPPath: "/meshes/{meshName}/virtualRouters", + } + + if input == nil { + input = &CreateVirtualRouterInput{} + } + + output = &CreateVirtualRouterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateVirtualRouter API operation for AWS App Mesh. +// +// Creates a new virtual router within a service mesh. +// +// Virtual routers handle traffic for one or more service names within your +// mesh. After you create your virtual router, create and associate routes for +// your virtual router that direct incoming requests to different virtual nodes. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation CreateVirtualRouter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeConflictException "ConflictException" +// The request contains a client token that was used for a previous update resource +// call with different specifications. Try the request again with a new client +// token. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have exceeded a service limit for your account. For more information, +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// in the AWS App Mesh User Guide. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualRouter +func (c *AppMesh) CreateVirtualRouter(input *CreateVirtualRouterInput) (*CreateVirtualRouterOutput, error) { + req, out := c.CreateVirtualRouterRequest(input) + return out, req.Send() +} + +// CreateVirtualRouterWithContext is the same as CreateVirtualRouter with the addition of +// the ability to pass a context and additional request options. +// +// See CreateVirtualRouter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) CreateVirtualRouterWithContext(ctx aws.Context, input *CreateVirtualRouterInput, opts ...request.Option) (*CreateVirtualRouterOutput, error) { + req, out := c.CreateVirtualRouterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteMesh = "DeleteMesh" + +// DeleteMeshRequest generates a "aws/request.Request" representing the +// client's request for the DeleteMesh operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteMesh for more information on using the DeleteMesh +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteMeshRequest method. +// req, resp := client.DeleteMeshRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteMesh +func (c *AppMesh) DeleteMeshRequest(input *DeleteMeshInput) (req *request.Request, output *DeleteMeshOutput) { + op := &request.Operation{ + Name: opDeleteMesh, + HTTPMethod: "DELETE", + HTTPPath: "/meshes/{meshName}", + } + + if input == nil { + input = &DeleteMeshInput{} + } + + output = &DeleteMeshOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteMesh API operation for AWS App Mesh. +// +// Deletes an existing service mesh. +// +// You must delete all resources (routes, virtual routers, virtual nodes) in +// the service mesh before you can delete the mesh 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 App Mesh's +// API operation DeleteMesh for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// You cannot delete the specified resource because it is in use or required +// by another resource. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteMesh +func (c *AppMesh) DeleteMesh(input *DeleteMeshInput) (*DeleteMeshOutput, error) { + req, out := c.DeleteMeshRequest(input) + return out, req.Send() +} + +// DeleteMeshWithContext is the same as DeleteMesh with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteMesh for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) DeleteMeshWithContext(ctx aws.Context, input *DeleteMeshInput, opts ...request.Option) (*DeleteMeshOutput, error) { + req, out := c.DeleteMeshRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRoute for more information on using the DeleteRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRouteRequest method. +// req, resp := client.DeleteRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteRoute +func (c *AppMesh) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) { + op := &request.Operation{ + Name: opDeleteRoute, + HTTPMethod: "DELETE", + HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}", + } + + if input == nil { + input = &DeleteRouteInput{} + } + + output = &DeleteRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRoute API operation for AWS App Mesh. +// +// Deletes an existing route. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation DeleteRoute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// You cannot delete the specified resource because it is in use or required +// by another resource. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteRoute +func (c *AppMesh) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) { + req, out := c.DeleteRouteRequest(input) + return out, req.Send() +} + +// DeleteRouteWithContext is the same as DeleteRoute with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) { + req, out := c.DeleteRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteVirtualNode = "DeleteVirtualNode" + +// DeleteVirtualNodeRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVirtualNode operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteVirtualNode for more information on using the DeleteVirtualNode +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteVirtualNodeRequest method. +// req, resp := client.DeleteVirtualNodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualNode +func (c *AppMesh) DeleteVirtualNodeRequest(input *DeleteVirtualNodeInput) (req *request.Request, output *DeleteVirtualNodeOutput) { + op := &request.Operation{ + Name: opDeleteVirtualNode, + HTTPMethod: "DELETE", + HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}", + } + + if input == nil { + input = &DeleteVirtualNodeInput{} + } + + output = &DeleteVirtualNodeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVirtualNode API operation for AWS App Mesh. +// +// Deletes an existing virtual 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 +// the error. +// +// See the AWS API reference guide for AWS App Mesh's +// API operation DeleteVirtualNode for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// You cannot delete the specified resource because it is in use or required +// by another resource. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualNode +func (c *AppMesh) DeleteVirtualNode(input *DeleteVirtualNodeInput) (*DeleteVirtualNodeOutput, error) { + req, out := c.DeleteVirtualNodeRequest(input) + return out, req.Send() +} + +// DeleteVirtualNodeWithContext is the same as DeleteVirtualNode with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVirtualNode for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) DeleteVirtualNodeWithContext(ctx aws.Context, input *DeleteVirtualNodeInput, opts ...request.Option) (*DeleteVirtualNodeOutput, error) { + req, out := c.DeleteVirtualNodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteVirtualRouter = "DeleteVirtualRouter" + +// DeleteVirtualRouterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVirtualRouter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteVirtualRouter for more information on using the DeleteVirtualRouter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteVirtualRouterRequest method. +// req, resp := client.DeleteVirtualRouterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualRouter +func (c *AppMesh) DeleteVirtualRouterRequest(input *DeleteVirtualRouterInput) (req *request.Request, output *DeleteVirtualRouterOutput) { + op := &request.Operation{ + Name: opDeleteVirtualRouter, + HTTPMethod: "DELETE", + HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}", + } + + if input == nil { + input = &DeleteVirtualRouterInput{} + } + + output = &DeleteVirtualRouterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVirtualRouter API operation for AWS App Mesh. +// +// Deletes an existing virtual router. +// +// You must delete any routes associated with the virtual router before you +// can delete the router 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 App Mesh's +// API operation DeleteVirtualRouter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// You cannot delete the specified resource because it is in use or required +// by another resource. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualRouter +func (c *AppMesh) DeleteVirtualRouter(input *DeleteVirtualRouterInput) (*DeleteVirtualRouterOutput, error) { + req, out := c.DeleteVirtualRouterRequest(input) + return out, req.Send() +} + +// DeleteVirtualRouterWithContext is the same as DeleteVirtualRouter with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVirtualRouter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) DeleteVirtualRouterWithContext(ctx aws.Context, input *DeleteVirtualRouterInput, opts ...request.Option) (*DeleteVirtualRouterOutput, error) { + req, out := c.DeleteVirtualRouterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeMesh = "DescribeMesh" + +// DescribeMeshRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMesh operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeMesh for more information on using the DescribeMesh +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeMeshRequest method. +// req, resp := client.DescribeMeshRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeMesh +func (c *AppMesh) DescribeMeshRequest(input *DescribeMeshInput) (req *request.Request, output *DescribeMeshOutput) { + op := &request.Operation{ + Name: opDescribeMesh, + HTTPMethod: "GET", + HTTPPath: "/meshes/{meshName}", + } + + if input == nil { + input = &DescribeMeshInput{} + } + + output = &DescribeMeshOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeMesh API operation for AWS App Mesh. +// +// Describes an existing 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 App Mesh's +// API operation DescribeMesh for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeMesh +func (c *AppMesh) DescribeMesh(input *DescribeMeshInput) (*DescribeMeshOutput, error) { + req, out := c.DescribeMeshRequest(input) + return out, req.Send() +} + +// DescribeMeshWithContext is the same as DescribeMesh with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeMesh for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) DescribeMeshWithContext(ctx aws.Context, input *DescribeMeshInput, opts ...request.Option) (*DescribeMeshOutput, error) { + req, out := c.DescribeMeshRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeRoute = "DescribeRoute" + +// DescribeRouteRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRoute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeRoute for more information on using the DescribeRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeRouteRequest method. +// req, resp := client.DescribeRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeRoute +func (c *AppMesh) DescribeRouteRequest(input *DescribeRouteInput) (req *request.Request, output *DescribeRouteOutput) { + op := &request.Operation{ + Name: opDescribeRoute, + HTTPMethod: "GET", + HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}", + } + + if input == nil { + input = &DescribeRouteInput{} + } + + output = &DescribeRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeRoute API operation for AWS App Mesh. +// +// Describes an existing route. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation DescribeRoute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeRoute +func (c *AppMesh) DescribeRoute(input *DescribeRouteInput) (*DescribeRouteOutput, error) { + req, out := c.DescribeRouteRequest(input) + return out, req.Send() +} + +// DescribeRouteWithContext is the same as DescribeRoute with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) DescribeRouteWithContext(ctx aws.Context, input *DescribeRouteInput, opts ...request.Option) (*DescribeRouteOutput, error) { + req, out := c.DescribeRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeVirtualNode = "DescribeVirtualNode" + +// DescribeVirtualNodeRequest generates a "aws/request.Request" representing the +// client's request for the DescribeVirtualNode operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeVirtualNode for more information on using the DescribeVirtualNode +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeVirtualNodeRequest method. +// req, resp := client.DescribeVirtualNodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualNode +func (c *AppMesh) DescribeVirtualNodeRequest(input *DescribeVirtualNodeInput) (req *request.Request, output *DescribeVirtualNodeOutput) { + op := &request.Operation{ + Name: opDescribeVirtualNode, + HTTPMethod: "GET", + HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}", + } + + if input == nil { + input = &DescribeVirtualNodeInput{} + } + + output = &DescribeVirtualNodeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeVirtualNode API operation for AWS App Mesh. +// +// Describes an existing virtual 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 +// the error. +// +// See the AWS API reference guide for AWS App Mesh's +// API operation DescribeVirtualNode for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualNode +func (c *AppMesh) DescribeVirtualNode(input *DescribeVirtualNodeInput) (*DescribeVirtualNodeOutput, error) { + req, out := c.DescribeVirtualNodeRequest(input) + return out, req.Send() +} + +// DescribeVirtualNodeWithContext is the same as DescribeVirtualNode with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeVirtualNode for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) DescribeVirtualNodeWithContext(ctx aws.Context, input *DescribeVirtualNodeInput, opts ...request.Option) (*DescribeVirtualNodeOutput, error) { + req, out := c.DescribeVirtualNodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeVirtualRouter = "DescribeVirtualRouter" + +// DescribeVirtualRouterRequest generates a "aws/request.Request" representing the +// client's request for the DescribeVirtualRouter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeVirtualRouter for more information on using the DescribeVirtualRouter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeVirtualRouterRequest method. +// req, resp := client.DescribeVirtualRouterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualRouter +func (c *AppMesh) DescribeVirtualRouterRequest(input *DescribeVirtualRouterInput) (req *request.Request, output *DescribeVirtualRouterOutput) { + op := &request.Operation{ + Name: opDescribeVirtualRouter, + HTTPMethod: "GET", + HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}", + } + + if input == nil { + input = &DescribeVirtualRouterInput{} + } + + output = &DescribeVirtualRouterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeVirtualRouter API operation for AWS App Mesh. +// +// Describes an existing virtual router. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation DescribeVirtualRouter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualRouter +func (c *AppMesh) DescribeVirtualRouter(input *DescribeVirtualRouterInput) (*DescribeVirtualRouterOutput, error) { + req, out := c.DescribeVirtualRouterRequest(input) + return out, req.Send() +} + +// DescribeVirtualRouterWithContext is the same as DescribeVirtualRouter with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeVirtualRouter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) DescribeVirtualRouterWithContext(ctx aws.Context, input *DescribeVirtualRouterInput, opts ...request.Option) (*DescribeVirtualRouterOutput, error) { + req, out := c.DescribeVirtualRouterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListMeshes = "ListMeshes" + +// ListMeshesRequest generates a "aws/request.Request" representing the +// client's request for the ListMeshes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListMeshes for more information on using the ListMeshes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListMeshesRequest method. +// req, resp := client.ListMeshesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListMeshes +func (c *AppMesh) ListMeshesRequest(input *ListMeshesInput) (req *request.Request, output *ListMeshesOutput) { + op := &request.Operation{ + Name: opListMeshes, + HTTPMethod: "GET", + HTTPPath: "/meshes", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListMeshesInput{} + } + + output = &ListMeshesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListMeshes API operation for AWS App Mesh. +// +// Returns a list of existing service meshes. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation ListMeshes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListMeshes +func (c *AppMesh) ListMeshes(input *ListMeshesInput) (*ListMeshesOutput, error) { + req, out := c.ListMeshesRequest(input) + return out, req.Send() +} + +// ListMeshesWithContext is the same as ListMeshes with the addition of +// the ability to pass a context and additional request options. +// +// See ListMeshes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) ListMeshesWithContext(ctx aws.Context, input *ListMeshesInput, opts ...request.Option) (*ListMeshesOutput, error) { + req, out := c.ListMeshesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListMeshesPages iterates over the pages of a ListMeshes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListMeshes 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 ListMeshes operation. +// pageNum := 0 +// err := client.ListMeshesPages(params, +// func(page *ListMeshesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *AppMesh) ListMeshesPages(input *ListMeshesInput, fn func(*ListMeshesOutput, bool) bool) error { + return c.ListMeshesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListMeshesPagesWithContext same as ListMeshesPages 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 *AppMesh) ListMeshesPagesWithContext(ctx aws.Context, input *ListMeshesInput, fn func(*ListMeshesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListMeshesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListMeshesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListMeshesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListRoutes = "ListRoutes" + +// ListRoutesRequest generates a "aws/request.Request" representing the +// client's request for the ListRoutes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRoutes for more information on using the ListRoutes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRoutesRequest method. +// req, resp := client.ListRoutesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListRoutes +func (c *AppMesh) ListRoutesRequest(input *ListRoutesInput) (req *request.Request, output *ListRoutesOutput) { + op := &request.Operation{ + Name: opListRoutes, + HTTPMethod: "GET", + HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListRoutesInput{} + } + + output = &ListRoutesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRoutes API operation for AWS App Mesh. +// +// Returns a list of existing routes in a service mesh. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation ListRoutes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListRoutes +func (c *AppMesh) ListRoutes(input *ListRoutesInput) (*ListRoutesOutput, error) { + req, out := c.ListRoutesRequest(input) + return out, req.Send() +} + +// ListRoutesWithContext is the same as ListRoutes with the addition of +// the ability to pass a context and additional request options. +// +// See ListRoutes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) ListRoutesWithContext(ctx aws.Context, input *ListRoutesInput, opts ...request.Option) (*ListRoutesOutput, error) { + req, out := c.ListRoutesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListRoutesPages iterates over the pages of a ListRoutes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListRoutes 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 ListRoutes operation. +// pageNum := 0 +// err := client.ListRoutesPages(params, +// func(page *ListRoutesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *AppMesh) ListRoutesPages(input *ListRoutesInput, fn func(*ListRoutesOutput, bool) bool) error { + return c.ListRoutesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListRoutesPagesWithContext same as ListRoutesPages 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 *AppMesh) ListRoutesPagesWithContext(ctx aws.Context, input *ListRoutesInput, fn func(*ListRoutesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListRoutesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListRoutesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListRoutesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListVirtualNodes = "ListVirtualNodes" + +// ListVirtualNodesRequest generates a "aws/request.Request" representing the +// client's request for the ListVirtualNodes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListVirtualNodes for more information on using the ListVirtualNodes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListVirtualNodesRequest method. +// req, resp := client.ListVirtualNodesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualNodes +func (c *AppMesh) ListVirtualNodesRequest(input *ListVirtualNodesInput) (req *request.Request, output *ListVirtualNodesOutput) { + op := &request.Operation{ + Name: opListVirtualNodes, + HTTPMethod: "GET", + HTTPPath: "/meshes/{meshName}/virtualNodes", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListVirtualNodesInput{} + } + + output = &ListVirtualNodesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVirtualNodes API operation for AWS App Mesh. +// +// Returns a list of existing virtual nodes. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation ListVirtualNodes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualNodes +func (c *AppMesh) ListVirtualNodes(input *ListVirtualNodesInput) (*ListVirtualNodesOutput, error) { + req, out := c.ListVirtualNodesRequest(input) + return out, req.Send() +} + +// ListVirtualNodesWithContext is the same as ListVirtualNodes with the addition of +// the ability to pass a context and additional request options. +// +// See ListVirtualNodes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) ListVirtualNodesWithContext(ctx aws.Context, input *ListVirtualNodesInput, opts ...request.Option) (*ListVirtualNodesOutput, error) { + req, out := c.ListVirtualNodesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListVirtualNodesPages iterates over the pages of a ListVirtualNodes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListVirtualNodes 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 ListVirtualNodes operation. +// pageNum := 0 +// err := client.ListVirtualNodesPages(params, +// func(page *ListVirtualNodesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *AppMesh) ListVirtualNodesPages(input *ListVirtualNodesInput, fn func(*ListVirtualNodesOutput, bool) bool) error { + return c.ListVirtualNodesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListVirtualNodesPagesWithContext same as ListVirtualNodesPages 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 *AppMesh) ListVirtualNodesPagesWithContext(ctx aws.Context, input *ListVirtualNodesInput, fn func(*ListVirtualNodesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListVirtualNodesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListVirtualNodesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListVirtualNodesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListVirtualRouters = "ListVirtualRouters" + +// ListVirtualRoutersRequest generates a "aws/request.Request" representing the +// client's request for the ListVirtualRouters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListVirtualRouters for more information on using the ListVirtualRouters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListVirtualRoutersRequest method. +// req, resp := client.ListVirtualRoutersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualRouters +func (c *AppMesh) ListVirtualRoutersRequest(input *ListVirtualRoutersInput) (req *request.Request, output *ListVirtualRoutersOutput) { + op := &request.Operation{ + Name: opListVirtualRouters, + HTTPMethod: "GET", + HTTPPath: "/meshes/{meshName}/virtualRouters", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListVirtualRoutersInput{} + } + + output = &ListVirtualRoutersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVirtualRouters API operation for AWS App Mesh. +// +// Returns a list of existing virtual routers in a service mesh. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation ListVirtualRouters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualRouters +func (c *AppMesh) ListVirtualRouters(input *ListVirtualRoutersInput) (*ListVirtualRoutersOutput, error) { + req, out := c.ListVirtualRoutersRequest(input) + return out, req.Send() +} + +// ListVirtualRoutersWithContext is the same as ListVirtualRouters with the addition of +// the ability to pass a context and additional request options. +// +// See ListVirtualRouters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) ListVirtualRoutersWithContext(ctx aws.Context, input *ListVirtualRoutersInput, opts ...request.Option) (*ListVirtualRoutersOutput, error) { + req, out := c.ListVirtualRoutersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListVirtualRoutersPages iterates over the pages of a ListVirtualRouters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListVirtualRouters 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 ListVirtualRouters operation. +// pageNum := 0 +// err := client.ListVirtualRoutersPages(params, +// func(page *ListVirtualRoutersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *AppMesh) ListVirtualRoutersPages(input *ListVirtualRoutersInput, fn func(*ListVirtualRoutersOutput, bool) bool) error { + return c.ListVirtualRoutersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListVirtualRoutersPagesWithContext same as ListVirtualRoutersPages 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 *AppMesh) ListVirtualRoutersPagesWithContext(ctx aws.Context, input *ListVirtualRoutersInput, fn func(*ListVirtualRoutersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListVirtualRoutersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListVirtualRoutersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListVirtualRoutersOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opUpdateRoute = "UpdateRoute" + +// UpdateRouteRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRoute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRoute for more information on using the UpdateRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRouteRequest method. +// req, resp := client.UpdateRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateRoute +func (c *AppMesh) UpdateRouteRequest(input *UpdateRouteInput) (req *request.Request, output *UpdateRouteOutput) { + op := &request.Operation{ + Name: opUpdateRoute, + HTTPMethod: "PUT", + HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}", + } + + if input == nil { + input = &UpdateRouteInput{} + } + + output = &UpdateRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRoute API operation for AWS App Mesh. +// +// Updates an existing route for a specified service mesh and virtual router. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation UpdateRoute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeConflictException "ConflictException" +// The request contains a client token that was used for a previous update resource +// call with different specifications. Try the request again with a new client +// token. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have exceeded a service limit for your account. For more information, +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// in the AWS App Mesh User Guide. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateRoute +func (c *AppMesh) UpdateRoute(input *UpdateRouteInput) (*UpdateRouteOutput, error) { + req, out := c.UpdateRouteRequest(input) + return out, req.Send() +} + +// UpdateRouteWithContext is the same as UpdateRoute with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) UpdateRouteWithContext(ctx aws.Context, input *UpdateRouteInput, opts ...request.Option) (*UpdateRouteOutput, error) { + req, out := c.UpdateRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateVirtualNode = "UpdateVirtualNode" + +// UpdateVirtualNodeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVirtualNode operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVirtualNode for more information on using the UpdateVirtualNode +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVirtualNodeRequest method. +// req, resp := client.UpdateVirtualNodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualNode +func (c *AppMesh) UpdateVirtualNodeRequest(input *UpdateVirtualNodeInput) (req *request.Request, output *UpdateVirtualNodeOutput) { + op := &request.Operation{ + Name: opUpdateVirtualNode, + HTTPMethod: "PUT", + HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}", + } + + if input == nil { + input = &UpdateVirtualNodeInput{} + } + + output = &UpdateVirtualNodeOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVirtualNode API operation for AWS App Mesh. +// +// Updates an existing virtual node in a specified service mesh. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation UpdateVirtualNode for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeConflictException "ConflictException" +// The request contains a client token that was used for a previous update resource +// call with different specifications. Try the request again with a new client +// token. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have exceeded a service limit for your account. For more information, +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// in the AWS App Mesh User Guide. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualNode +func (c *AppMesh) UpdateVirtualNode(input *UpdateVirtualNodeInput) (*UpdateVirtualNodeOutput, error) { + req, out := c.UpdateVirtualNodeRequest(input) + return out, req.Send() +} + +// UpdateVirtualNodeWithContext is the same as UpdateVirtualNode with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVirtualNode for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) UpdateVirtualNodeWithContext(ctx aws.Context, input *UpdateVirtualNodeInput, opts ...request.Option) (*UpdateVirtualNodeOutput, error) { + req, out := c.UpdateVirtualNodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateVirtualRouter = "UpdateVirtualRouter" + +// UpdateVirtualRouterRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVirtualRouter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVirtualRouter for more information on using the UpdateVirtualRouter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVirtualRouterRequest method. +// req, resp := client.UpdateVirtualRouterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualRouter +func (c *AppMesh) UpdateVirtualRouterRequest(input *UpdateVirtualRouterInput) (req *request.Request, output *UpdateVirtualRouterOutput) { + op := &request.Operation{ + Name: opUpdateVirtualRouter, + HTTPMethod: "PUT", + HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}", + } + + if input == nil { + input = &UpdateVirtualRouterInput{} + } + + output = &UpdateVirtualRouterOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVirtualRouter API operation for AWS App Mesh. +// +// Updates an existing virtual router in a specified service mesh. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 App Mesh's +// API operation UpdateVirtualRouter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request syntax was malformed. Check your request syntax and try again. +// +// * ErrCodeConflictException "ConflictException" +// The request contains a client token that was used for a previous update resource +// call with different specifications. Try the request again with a new client +// token. +// +// * ErrCodeForbiddenException "ForbiddenException" +// You do not have permissions to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The request processing has failed because of an unknown error, exception, +// or failure. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have exceeded a service limit for your account. For more information, +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// in the AWS App Mesh User Guide. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified resource does not exist. Check your request syntax and try +// again. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed due to a temporary failure of the service. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The maximum request rate permitted by the App Mesh APIs has been exceeded +// for your account. For best results, use an increasing or variable sleep interval +// between requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualRouter +func (c *AppMesh) UpdateVirtualRouter(input *UpdateVirtualRouterInput) (*UpdateVirtualRouterOutput, error) { + req, out := c.UpdateVirtualRouterRequest(input) + return out, req.Send() +} + +// UpdateVirtualRouterWithContext is the same as UpdateVirtualRouter with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVirtualRouter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppMesh) UpdateVirtualRouterWithContext(ctx aws.Context, input *UpdateVirtualRouterInput, opts ...request.Option) (*UpdateVirtualRouterOutput, error) { + req, out := c.UpdateVirtualRouterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type CreateMeshInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The name to use for the service mesh. + // + // MeshName is a required field + MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateMeshInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateMeshInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateMeshInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateMeshInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateMeshInput) SetClientToken(v string) *CreateMeshInput { + s.ClientToken = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *CreateMeshInput) SetMeshName(v string) *CreateMeshInput { + s.MeshName = &v + return s +} + +type CreateMeshOutput struct { + _ struct{} `type:"structure" payload:"Mesh"` + + // The full description of your service mesh following the create call. + Mesh *MeshData `locationName:"mesh" type:"structure"` +} + +// String returns the string representation +func (s CreateMeshOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateMeshOutput) GoString() string { + return s.String() +} + +// SetMesh sets the Mesh field's value. +func (s *CreateMeshOutput) SetMesh(v *MeshData) *CreateMeshOutput { + s.Mesh = v + return s +} + +type CreateRouteInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The name of the service mesh in which to create the route. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The name to use for the route. + // + // RouteName is a required field + RouteName *string `locationName:"routeName" min:"1" type:"string" required:"true"` + + // The route specification to apply. + // + // Spec is a required field + Spec *RouteSpec `locationName:"spec" type:"structure" required:"true"` + + // The name of the virtual router in which to create the route. + // + // VirtualRouterName is a required field + VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteInput) 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.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.RouteName == nil { + invalidParams.Add(request.NewErrParamRequired("RouteName")) + } + if s.RouteName != nil && len(*s.RouteName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteName", 1)) + } + if s.Spec == nil { + invalidParams.Add(request.NewErrParamRequired("Spec")) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + if s.Spec != nil { + if err := s.Spec.Validate(); err != nil { + invalidParams.AddNested("Spec", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateRouteInput) SetClientToken(v string) *CreateRouteInput { + s.ClientToken = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *CreateRouteInput) SetMeshName(v string) *CreateRouteInput { + s.MeshName = &v + return s +} + +// SetRouteName sets the RouteName field's value. +func (s *CreateRouteInput) SetRouteName(v string) *CreateRouteInput { + s.RouteName = &v + return s +} + +// SetSpec sets the Spec field's value. +func (s *CreateRouteInput) SetSpec(v *RouteSpec) *CreateRouteInput { + s.Spec = v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *CreateRouteInput) SetVirtualRouterName(v string) *CreateRouteInput { + s.VirtualRouterName = &v + return s +} + +type CreateRouteOutput struct { + _ struct{} `type:"structure" payload:"Route"` + + // The full description of your mesh following the create call. + Route *RouteData `locationName:"route" type:"structure"` +} + +// String returns the string representation +func (s CreateRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteOutput) GoString() string { + return s.String() +} + +// SetRoute sets the Route field's value. +func (s *CreateRouteOutput) SetRoute(v *RouteData) *CreateRouteOutput { + s.Route = v + return s +} + +type CreateVirtualNodeInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The name of the service mesh in which to create the virtual node. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The virtual node specification to apply. + // + // Spec is a required field + Spec *VirtualNodeSpec `locationName:"spec" type:"structure" required:"true"` + + // The name to use for the virtual node. + // + // VirtualNodeName is a required field + VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateVirtualNodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVirtualNodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVirtualNodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVirtualNodeInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.Spec == nil { + invalidParams.Add(request.NewErrParamRequired("Spec")) + } + if s.VirtualNodeName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualNodeName")) + } + if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1)) + } + if s.Spec != nil { + if err := s.Spec.Validate(); err != nil { + invalidParams.AddNested("Spec", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateVirtualNodeInput) SetClientToken(v string) *CreateVirtualNodeInput { + s.ClientToken = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *CreateVirtualNodeInput) SetMeshName(v string) *CreateVirtualNodeInput { + s.MeshName = &v + return s +} + +// SetSpec sets the Spec field's value. +func (s *CreateVirtualNodeInput) SetSpec(v *VirtualNodeSpec) *CreateVirtualNodeInput { + s.Spec = v + return s +} + +// SetVirtualNodeName sets the VirtualNodeName field's value. +func (s *CreateVirtualNodeInput) SetVirtualNodeName(v string) *CreateVirtualNodeInput { + s.VirtualNodeName = &v + return s +} + +type CreateVirtualNodeOutput struct { + _ struct{} `type:"structure" payload:"VirtualNode"` + + // The full description of your virtual node following the create call. + VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"` +} + +// String returns the string representation +func (s CreateVirtualNodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVirtualNodeOutput) GoString() string { + return s.String() +} + +// SetVirtualNode sets the VirtualNode field's value. +func (s *CreateVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *CreateVirtualNodeOutput { + s.VirtualNode = v + return s +} + +type CreateVirtualRouterInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The name of the service mesh in which to create the virtual router. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The virtual router specification to apply. + // + // Spec is a required field + Spec *VirtualRouterSpec `locationName:"spec" type:"structure" required:"true"` + + // The name to use for the virtual router. + // + // VirtualRouterName is a required field + VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateVirtualRouterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVirtualRouterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVirtualRouterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVirtualRouterInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.Spec == nil { + invalidParams.Add(request.NewErrParamRequired("Spec")) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateVirtualRouterInput) SetClientToken(v string) *CreateVirtualRouterInput { + s.ClientToken = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *CreateVirtualRouterInput) SetMeshName(v string) *CreateVirtualRouterInput { + s.MeshName = &v + return s +} + +// SetSpec sets the Spec field's value. +func (s *CreateVirtualRouterInput) SetSpec(v *VirtualRouterSpec) *CreateVirtualRouterInput { + s.Spec = v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *CreateVirtualRouterInput) SetVirtualRouterName(v string) *CreateVirtualRouterInput { + s.VirtualRouterName = &v + return s +} + +type CreateVirtualRouterOutput struct { + _ struct{} `type:"structure" payload:"VirtualRouter"` + + // The full description of your virtual router following the create call. + VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"` +} + +// String returns the string representation +func (s CreateVirtualRouterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVirtualRouterOutput) GoString() string { + return s.String() +} + +// SetVirtualRouter sets the VirtualRouter field's value. +func (s *CreateVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *CreateVirtualRouterOutput { + s.VirtualRouter = v + return s +} + +type DeleteMeshInput struct { + _ struct{} `type:"structure"` + + // The name of the service mesh to delete. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteMeshInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteMeshInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMeshInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMeshInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMeshName sets the MeshName field's value. +func (s *DeleteMeshInput) SetMeshName(v string) *DeleteMeshInput { + s.MeshName = &v + return s +} + +type DeleteMeshOutput struct { + _ struct{} `type:"structure" payload:"Mesh"` + + // The service mesh that was deleted. + Mesh *MeshData `locationName:"mesh" type:"structure"` +} + +// String returns the string representation +func (s DeleteMeshOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteMeshOutput) GoString() string { + return s.String() +} + +// SetMesh sets the Mesh field's value. +func (s *DeleteMeshOutput) SetMesh(v *MeshData) *DeleteMeshOutput { + s.Mesh = v + return s +} + +type DeleteRouteInput struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which to delete the route. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The name of the route to delete. + // + // RouteName is a required field + RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"` + + // The name of the virtual router in which to delete the route. + // + // VirtualRouterName is a required field + VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteInput) 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.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.RouteName == nil { + invalidParams.Add(request.NewErrParamRequired("RouteName")) + } + if s.RouteName != nil && len(*s.RouteName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteName", 1)) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMeshName sets the MeshName field's value. +func (s *DeleteRouteInput) SetMeshName(v string) *DeleteRouteInput { + s.MeshName = &v + return s +} + +// SetRouteName sets the RouteName field's value. +func (s *DeleteRouteInput) SetRouteName(v string) *DeleteRouteInput { + s.RouteName = &v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *DeleteRouteInput) SetVirtualRouterName(v string) *DeleteRouteInput { + s.VirtualRouterName = &v + return s +} + +type DeleteRouteOutput struct { + _ struct{} `type:"structure" payload:"Route"` + + // The route that was deleted. + Route *RouteData `locationName:"route" type:"structure"` +} + +// String returns the string representation +func (s DeleteRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteOutput) GoString() string { + return s.String() +} + +// SetRoute sets the Route field's value. +func (s *DeleteRouteOutput) SetRoute(v *RouteData) *DeleteRouteOutput { + s.Route = v + return s +} + +type DeleteVirtualNodeInput struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which to delete the virtual node. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The name of the virtual node to delete. + // + // VirtualNodeName is a required field + VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVirtualNodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVirtualNodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVirtualNodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualNodeInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.VirtualNodeName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualNodeName")) + } + if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMeshName sets the MeshName field's value. +func (s *DeleteVirtualNodeInput) SetMeshName(v string) *DeleteVirtualNodeInput { + s.MeshName = &v + return s +} + +// SetVirtualNodeName sets the VirtualNodeName field's value. +func (s *DeleteVirtualNodeInput) SetVirtualNodeName(v string) *DeleteVirtualNodeInput { + s.VirtualNodeName = &v + return s +} + +type DeleteVirtualNodeOutput struct { + _ struct{} `type:"structure" payload:"VirtualNode"` + + // The virtual node that was deleted. + VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"` +} + +// String returns the string representation +func (s DeleteVirtualNodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVirtualNodeOutput) GoString() string { + return s.String() +} + +// SetVirtualNode sets the VirtualNode field's value. +func (s *DeleteVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *DeleteVirtualNodeOutput { + s.VirtualNode = v + return s +} + +type DeleteVirtualRouterInput struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which to delete the virtual router. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The name of the virtual router to delete. + // + // VirtualRouterName is a required field + VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVirtualRouterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVirtualRouterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVirtualRouterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualRouterInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMeshName sets the MeshName field's value. +func (s *DeleteVirtualRouterInput) SetMeshName(v string) *DeleteVirtualRouterInput { + s.MeshName = &v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *DeleteVirtualRouterInput) SetVirtualRouterName(v string) *DeleteVirtualRouterInput { + s.VirtualRouterName = &v + return s +} + +type DeleteVirtualRouterOutput struct { + _ struct{} `type:"structure" payload:"VirtualRouter"` + + // The virtual router that was deleted. + VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"` +} + +// String returns the string representation +func (s DeleteVirtualRouterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVirtualRouterOutput) GoString() string { + return s.String() +} + +// SetVirtualRouter sets the VirtualRouter field's value. +func (s *DeleteVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *DeleteVirtualRouterOutput { + s.VirtualRouter = v + return s +} + +type DescribeMeshInput struct { + _ struct{} `type:"structure"` + + // The name of the service mesh to describe. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeMeshInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMeshInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMeshInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMeshInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMeshName sets the MeshName field's value. +func (s *DescribeMeshInput) SetMeshName(v string) *DescribeMeshInput { + s.MeshName = &v + return s +} + +type DescribeMeshOutput struct { + _ struct{} `type:"structure" payload:"Mesh"` + + // The full description of your service mesh. + Mesh *MeshData `locationName:"mesh" type:"structure"` +} + +// String returns the string representation +func (s DescribeMeshOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMeshOutput) GoString() string { + return s.String() +} + +// SetMesh sets the Mesh field's value. +func (s *DescribeMeshOutput) SetMesh(v *MeshData) *DescribeMeshOutput { + s.Mesh = v + return s +} + +type DescribeRouteInput struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which the route resides. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The name of the route to describe. + // + // RouteName is a required field + RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"` + + // The name of the virtual router with which the route is associated. + // + // VirtualRouterName is a required field + VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRouteInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.RouteName == nil { + invalidParams.Add(request.NewErrParamRequired("RouteName")) + } + if s.RouteName != nil && len(*s.RouteName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteName", 1)) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMeshName sets the MeshName field's value. +func (s *DescribeRouteInput) SetMeshName(v string) *DescribeRouteInput { + s.MeshName = &v + return s +} + +// SetRouteName sets the RouteName field's value. +func (s *DescribeRouteInput) SetRouteName(v string) *DescribeRouteInput { + s.RouteName = &v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *DescribeRouteInput) SetVirtualRouterName(v string) *DescribeRouteInput { + s.VirtualRouterName = &v + return s +} + +type DescribeRouteOutput struct { + _ struct{} `type:"structure" payload:"Route"` + + // The full description of your route. + Route *RouteData `locationName:"route" type:"structure"` +} + +// String returns the string representation +func (s DescribeRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRouteOutput) GoString() string { + return s.String() +} + +// SetRoute sets the Route field's value. +func (s *DescribeRouteOutput) SetRoute(v *RouteData) *DescribeRouteOutput { + s.Route = v + return s +} + +type DescribeVirtualNodeInput struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which the virtual node resides. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The name of the virtual node to describe. + // + // VirtualNodeName is a required field + VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeVirtualNodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVirtualNodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVirtualNodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVirtualNodeInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.VirtualNodeName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualNodeName")) + } + if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMeshName sets the MeshName field's value. +func (s *DescribeVirtualNodeInput) SetMeshName(v string) *DescribeVirtualNodeInput { + s.MeshName = &v + return s +} + +// SetVirtualNodeName sets the VirtualNodeName field's value. +func (s *DescribeVirtualNodeInput) SetVirtualNodeName(v string) *DescribeVirtualNodeInput { + s.VirtualNodeName = &v + return s +} + +type DescribeVirtualNodeOutput struct { + _ struct{} `type:"structure" payload:"VirtualNode"` + + // The full description of your virtual node. + VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"` +} + +// String returns the string representation +func (s DescribeVirtualNodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVirtualNodeOutput) GoString() string { + return s.String() +} + +// SetVirtualNode sets the VirtualNode field's value. +func (s *DescribeVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *DescribeVirtualNodeOutput { + s.VirtualNode = v + return s +} + +type DescribeVirtualRouterInput struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which the virtual router resides. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The name of the virtual router to describe. + // + // VirtualRouterName is a required field + VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeVirtualRouterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVirtualRouterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVirtualRouterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVirtualRouterInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMeshName sets the MeshName field's value. +func (s *DescribeVirtualRouterInput) SetMeshName(v string) *DescribeVirtualRouterInput { + s.MeshName = &v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *DescribeVirtualRouterInput) SetVirtualRouterName(v string) *DescribeVirtualRouterInput { + s.VirtualRouterName = &v + return s +} + +type DescribeVirtualRouterOutput struct { + _ struct{} `type:"structure" payload:"VirtualRouter"` + + // The full description of your virtual router. + VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"` +} + +// String returns the string representation +func (s DescribeVirtualRouterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVirtualRouterOutput) GoString() string { + return s.String() +} + +// SetVirtualRouter sets the VirtualRouter field's value. +func (s *DescribeVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *DescribeVirtualRouterOutput { + s.VirtualRouter = v + return s +} + +// The DNS service discovery information for your virtual node. +type DnsServiceDiscovery struct { + _ struct{} `type:"structure"` + + // The DNS service name for your virtual node. + ServiceName *string `locationName:"serviceName" type:"string"` +} + +// String returns the string representation +func (s DnsServiceDiscovery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DnsServiceDiscovery) GoString() string { + return s.String() +} + +// SetServiceName sets the ServiceName field's value. +func (s *DnsServiceDiscovery) SetServiceName(v string) *DnsServiceDiscovery { + s.ServiceName = &v + return s +} + +// An object representing the health check policy for a virtual node's listener. +// +// Listener health checks are not available during the App Mesh preview. +type HealthCheckPolicy struct { + _ struct{} `type:"structure"` + + // The number of consecutive successful health checks that must occur before + // declaring listener healthy. + HealthyThreshold *int64 `locationName:"healthyThreshold" type:"integer"` + + // The time period in milliseconds between each health check execution. + IntervalMillis *int64 `locationName:"intervalMillis" type:"long"` + + // The destination path for the health check request. + Path *string `locationName:"path" type:"string"` + + // The destination port for the health check request. + Port *int64 `locationName:"port" min:"1" type:"integer"` + + // The protocol for the health check request. + Protocol *string `locationName:"protocol" type:"string" enum:"PortProtocol"` + + // The amount of time to wait when receiving a response from the health check, + // in milliseconds. + TimeoutMillis *int64 `locationName:"timeoutMillis" type:"long"` + + // The number of consecutive failed health checks that must occur before declaring + // a virtual node unhealthy. + UnhealthyThreshold *int64 `locationName:"unhealthyThreshold" type:"integer"` +} + +// String returns the string representation +func (s HealthCheckPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HealthCheckPolicy) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HealthCheckPolicy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HealthCheckPolicy"} + if s.Port != nil && *s.Port < 1 { + invalidParams.Add(request.NewErrParamMinValue("Port", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHealthyThreshold sets the HealthyThreshold field's value. +func (s *HealthCheckPolicy) SetHealthyThreshold(v int64) *HealthCheckPolicy { + s.HealthyThreshold = &v + return s +} + +// SetIntervalMillis sets the IntervalMillis field's value. +func (s *HealthCheckPolicy) SetIntervalMillis(v int64) *HealthCheckPolicy { + s.IntervalMillis = &v + return s +} + +// SetPath sets the Path field's value. +func (s *HealthCheckPolicy) SetPath(v string) *HealthCheckPolicy { + s.Path = &v + return s +} + +// SetPort sets the Port field's value. +func (s *HealthCheckPolicy) SetPort(v int64) *HealthCheckPolicy { + s.Port = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *HealthCheckPolicy) SetProtocol(v string) *HealthCheckPolicy { + s.Protocol = &v + return s +} + +// SetTimeoutMillis sets the TimeoutMillis field's value. +func (s *HealthCheckPolicy) SetTimeoutMillis(v int64) *HealthCheckPolicy { + s.TimeoutMillis = &v + return s +} + +// SetUnhealthyThreshold sets the UnhealthyThreshold field's value. +func (s *HealthCheckPolicy) SetUnhealthyThreshold(v int64) *HealthCheckPolicy { + s.UnhealthyThreshold = &v + return s +} + +// An object representing the HTTP routing specification for a route. +type HttpRoute struct { + _ struct{} `type:"structure"` + + // The action to take if a match is determined. + Action *HttpRouteAction `locationName:"action" type:"structure"` + + // The criteria for determining an HTTP request match. + Match *HttpRouteMatch `locationName:"match" type:"structure"` +} + +// String returns the string representation +func (s HttpRoute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HttpRoute) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HttpRoute) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HttpRoute"} + if s.Action != nil { + if err := s.Action.Validate(); err != nil { + invalidParams.AddNested("Action", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *HttpRoute) SetAction(v *HttpRouteAction) *HttpRoute { + s.Action = v + return s +} + +// SetMatch sets the Match field's value. +func (s *HttpRoute) SetMatch(v *HttpRouteMatch) *HttpRoute { + s.Match = v + return s +} + +// An object representing the traffic distribution requirements for matched +// HTTP requests. +type HttpRouteAction struct { + _ struct{} `type:"structure"` + + // The targets that traffic is routed to when a request matches the route. You + // can specify one or more targets and their relative weights with which to + // distribute traffic. + WeightedTargets []*WeightedTarget `locationName:"weightedTargets" type:"list"` +} + +// String returns the string representation +func (s HttpRouteAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HttpRouteAction) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HttpRouteAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HttpRouteAction"} + if s.WeightedTargets != nil { + for i, v := range s.WeightedTargets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "WeightedTargets", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWeightedTargets sets the WeightedTargets field's value. +func (s *HttpRouteAction) SetWeightedTargets(v []*WeightedTarget) *HttpRouteAction { + s.WeightedTargets = v + return s +} + +// An object representing the requirements for a route to match HTTP requests +// for a virtual router. +type HttpRouteMatch struct { + _ struct{} `type:"structure"` + + // Specifies the path with which to match requests. This parameter must always + // start with /, which by itself matches all requests to the virtual router + // service name. You can also match for path-based routing of requests. For + // example, if your virtual router service name is my-service.local, and you + // want the route to match requests to my-service.local/metrics, then your prefix + // should be /metrics. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s HttpRouteMatch) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HttpRouteMatch) GoString() string { + return s.String() +} + +// SetPrefix sets the Prefix field's value. +func (s *HttpRouteMatch) SetPrefix(v string) *HttpRouteMatch { + s.Prefix = &v + return s +} + +type ListMeshesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of mesh results returned by ListMeshes in paginated output. + // When this parameter is used, ListMeshes only returns limit results in a single + // page along with a nextToken response element. The remaining results of the + // initial request can be seen by sending another ListMeshes request with the + // returned nextToken value. This value can be between 1 and 100. If this parameter + // is not used, then ListMeshes returns up to 100 results and a nextToken value + // if applicable. + Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"` + + // The nextToken value returned from a previous paginated ListMeshes request + // where limit 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 ListMeshesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMeshesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMeshesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMeshesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListMeshesInput) SetLimit(v int64) *ListMeshesInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMeshesInput) SetNextToken(v string) *ListMeshesInput { + s.NextToken = &v + return s +} + +type ListMeshesOutput struct { + _ struct{} `type:"structure"` + + // The list of existing service meshes. + // + // Meshes is a required field + Meshes []*MeshRef `locationName:"meshes" type:"list" required:"true"` + + // The nextToken value to include in a future ListMeshes request. When the results + // of a ListMeshes request exceed limit, 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"` +} + +// String returns the string representation +func (s ListMeshesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMeshesOutput) GoString() string { + return s.String() +} + +// SetMeshes sets the Meshes field's value. +func (s *ListMeshesOutput) SetMeshes(v []*MeshRef) *ListMeshesOutput { + s.Meshes = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMeshesOutput) SetNextToken(v string) *ListMeshesOutput { + s.NextToken = &v + return s +} + +type ListRoutesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of mesh results returned by ListRoutes in paginated output. + // When this parameter is used, ListRoutes only returns limit results in a single + // page along with a nextToken response element. The remaining results of the + // initial request can be seen by sending another ListRoutes request with the + // returned nextToken value. This value can be between 1 and 100. If this parameter + // is not used, then ListRoutes returns up to 100 results and a nextToken value + // if applicable. + Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"` + + // The name of the service mesh in which to list routes. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The nextToken value returned from a previous paginated ListRoutes request + // where limit 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"` + + // The name of the virtual router in which to list routes. + // + // VirtualRouterName is a required field + VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListRoutesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRoutesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRoutesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRoutesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListRoutesInput) SetLimit(v int64) *ListRoutesInput { + s.Limit = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *ListRoutesInput) SetMeshName(v string) *ListRoutesInput { + s.MeshName = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRoutesInput) SetNextToken(v string) *ListRoutesInput { + s.NextToken = &v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *ListRoutesInput) SetVirtualRouterName(v string) *ListRoutesInput { + s.VirtualRouterName = &v + return s +} + +type ListRoutesOutput struct { + _ struct{} `type:"structure"` + + // The nextToken value to include in a future ListRoutes request. When the results + // of a ListRoutes request exceed limit, 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 list of existing routes for the specified service mesh and virtual router. + // + // Routes is a required field + Routes []*RouteRef `locationName:"routes" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListRoutesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRoutesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRoutesOutput) SetNextToken(v string) *ListRoutesOutput { + s.NextToken = &v + return s +} + +// SetRoutes sets the Routes field's value. +func (s *ListRoutesOutput) SetRoutes(v []*RouteRef) *ListRoutesOutput { + s.Routes = v + return s +} + +type ListVirtualNodesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of mesh results returned by ListVirtualNodes in paginated + // output. When this parameter is used, ListVirtualNodes only returns limit + // results in a single page along with a nextToken response element. The remaining + // results of the initial request can be seen by sending another ListVirtualNodes + // request with the returned nextToken value. This value can be between 1 and + // 100. If this parameter is not used, then ListVirtualNodes returns up to 100 + // results and a nextToken value if applicable. + Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"` + + // The name of the service mesh in which to list virtual nodes. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The nextToken value returned from a previous paginated ListVirtualNodes request + // where limit 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 ListVirtualNodesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVirtualNodesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVirtualNodesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVirtualNodesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListVirtualNodesInput) SetLimit(v int64) *ListVirtualNodesInput { + s.Limit = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *ListVirtualNodesInput) SetMeshName(v string) *ListVirtualNodesInput { + s.MeshName = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVirtualNodesInput) SetNextToken(v string) *ListVirtualNodesInput { + s.NextToken = &v + return s +} + +type ListVirtualNodesOutput struct { + _ struct{} `type:"structure"` + + // The nextToken value to include in a future ListVirtualNodes request. When + // the results of a ListVirtualNodes request exceed limit, 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 list of existing virtual nodes for the specified service mesh. + // + // VirtualNodes is a required field + VirtualNodes []*VirtualNodeRef `locationName:"virtualNodes" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListVirtualNodesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVirtualNodesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVirtualNodesOutput) SetNextToken(v string) *ListVirtualNodesOutput { + s.NextToken = &v + return s +} + +// SetVirtualNodes sets the VirtualNodes field's value. +func (s *ListVirtualNodesOutput) SetVirtualNodes(v []*VirtualNodeRef) *ListVirtualNodesOutput { + s.VirtualNodes = v + return s +} + +type ListVirtualRoutersInput struct { + _ struct{} `type:"structure"` + + // The maximum number of mesh results returned by ListVirtualRouters in paginated + // output. When this parameter is used, ListVirtualRouters only returns limit + // results in a single page along with a nextToken response element. The remaining + // results of the initial request can be seen by sending another ListVirtualRouters + // request with the returned nextToken value. This value can be between 1 and + // 100. If this parameter is not used, then ListVirtualRouters returns up to + // 100 results and a nextToken value if applicable. + Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"` + + // The name of the service mesh in which to list virtual routers. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The nextToken value returned from a previous paginated ListVirtualRouters + // request where limit 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 ListVirtualRoutersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVirtualRoutersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVirtualRoutersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVirtualRoutersInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListVirtualRoutersInput) SetLimit(v int64) *ListVirtualRoutersInput { + s.Limit = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *ListVirtualRoutersInput) SetMeshName(v string) *ListVirtualRoutersInput { + s.MeshName = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVirtualRoutersInput) SetNextToken(v string) *ListVirtualRoutersInput { + s.NextToken = &v + return s +} + +type ListVirtualRoutersOutput struct { + _ struct{} `type:"structure"` + + // The nextToken value to include in a future ListVirtualRouters request. When + // the results of a ListVirtualRouters request exceed limit, 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 list of existing virtual routers for the specified service mesh. + // + // VirtualRouters is a required field + VirtualRouters []*VirtualRouterRef `locationName:"virtualRouters" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListVirtualRoutersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVirtualRoutersOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVirtualRoutersOutput) SetNextToken(v string) *ListVirtualRoutersOutput { + s.NextToken = &v + return s +} + +// SetVirtualRouters sets the VirtualRouters field's value. +func (s *ListVirtualRoutersOutput) SetVirtualRouters(v []*VirtualRouterRef) *ListVirtualRoutersOutput { + s.VirtualRouters = v + return s +} + +// An object representing a listener for a virtual node. +type Listener struct { + _ struct{} `type:"structure"` + + // The health check information for the listener. + // + // Listener health checks are not available during the App Mesh preview. + HealthCheck *HealthCheckPolicy `locationName:"healthCheck" type:"structure"` + + // The port mapping information for the listener. + PortMapping *PortMapping `locationName:"portMapping" type:"structure"` +} + +// String returns the string representation +func (s Listener) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Listener) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Listener) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Listener"} + if s.HealthCheck != nil { + if err := s.HealthCheck.Validate(); err != nil { + invalidParams.AddNested("HealthCheck", err.(request.ErrInvalidParams)) + } + } + if s.PortMapping != nil { + if err := s.PortMapping.Validate(); err != nil { + invalidParams.AddNested("PortMapping", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHealthCheck sets the HealthCheck field's value. +func (s *Listener) SetHealthCheck(v *HealthCheckPolicy) *Listener { + s.HealthCheck = v + return s +} + +// SetPortMapping sets the PortMapping field's value. +func (s *Listener) SetPortMapping(v *PortMapping) *Listener { + s.PortMapping = v + return s +} + +// An object representing a service mesh returned by a describe operation. +type MeshData struct { + _ struct{} `type:"structure"` + + // The name of the service mesh. + // + // MeshName is a required field + MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` + + // The associated metadata for the service mesh. + // + // Metadata is a required field + Metadata *ResourceMetadata `locationName:"metadata" type:"structure" required:"true"` + + // The status of the service mesh. + Status *MeshStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s MeshData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MeshData) GoString() string { + return s.String() +} + +// SetMeshName sets the MeshName field's value. +func (s *MeshData) SetMeshName(v string) *MeshData { + s.MeshName = &v + return s +} + +// SetMetadata sets the Metadata field's value. +func (s *MeshData) SetMetadata(v *ResourceMetadata) *MeshData { + s.Metadata = v + return s +} + +// SetStatus sets the Status field's value. +func (s *MeshData) SetStatus(v *MeshStatus) *MeshData { + s.Status = v + return s +} + +// An object representing a service mesh returned by a list operation. +type MeshRef struct { + _ struct{} `type:"structure"` + + // The full Amazon Resource Name (ARN) of the service mesh. + Arn *string `locationName:"arn" type:"string"` + + // The name of the service mesh. + MeshName *string `locationName:"meshName" min:"1" type:"string"` +} + +// String returns the string representation +func (s MeshRef) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MeshRef) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *MeshRef) SetArn(v string) *MeshRef { + s.Arn = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *MeshRef) SetMeshName(v string) *MeshRef { + s.MeshName = &v + return s +} + +// An object representing the status of a service mesh. +type MeshStatus struct { + _ struct{} `type:"structure"` + + // The current mesh status. + Status *string `locationName:"status" type:"string" enum:"MeshStatusCode"` +} + +// String returns the string representation +func (s MeshStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MeshStatus) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *MeshStatus) SetStatus(v string) *MeshStatus { + s.Status = &v + return s +} + +// An object representing a virtual node listener port mapping. +type PortMapping struct { + _ struct{} `type:"structure"` + + // The port used for the port mapping. + Port *int64 `locationName:"port" min:"1" type:"integer"` + + // The protocol used for the port mapping. + Protocol *string `locationName:"protocol" type:"string" enum:"PortProtocol"` +} + +// String returns the string representation +func (s PortMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PortMapping) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PortMapping) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PortMapping"} + if s.Port != nil && *s.Port < 1 { + invalidParams.Add(request.NewErrParamMinValue("Port", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPort sets the Port field's value. +func (s *PortMapping) SetPort(v int64) *PortMapping { + s.Port = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *PortMapping) SetProtocol(v string) *PortMapping { + s.Protocol = &v + return s +} + +// An object representing metadata for a resource. +type ResourceMetadata struct { + _ struct{} `type:"structure"` + + // The full Amazon Resource Name (ARN) for the resource. + // + // After you create a virtual node, set this value (either the full ARN or the + // truncated resource name, for example, mesh/default/virtualNode/simpleapp, + // as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's + // Envoy proxy container in your task definition or pod spec. This is then mapped + // to the node.id and node.cluster Envoy parameters. + // + // If you require your Envoy stats or tracing to use a different name, you can + // override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME + // with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. + Arn *string `locationName:"arn" type:"string"` + + // The Unix epoch timestamp in seconds for when the cluster was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The Unix epoch timestamp in seconds for when the cluster was last updated. + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` + + // The unique identifier for the resource. + Uid *string `locationName:"uid" type:"string"` + + // The version of the resource. Resources are created at version 1, and this + // version is incremented each time they are updated. + Version *int64 `locationName:"version" type:"long"` +} + +// String returns the string representation +func (s ResourceMetadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceMetadata) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ResourceMetadata) SetArn(v string) *ResourceMetadata { + s.Arn = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *ResourceMetadata) SetCreatedAt(v time.Time) *ResourceMetadata { + s.CreatedAt = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *ResourceMetadata) SetLastUpdatedAt(v time.Time) *ResourceMetadata { + s.LastUpdatedAt = &v + return s +} + +// SetUid sets the Uid field's value. +func (s *ResourceMetadata) SetUid(v string) *ResourceMetadata { + s.Uid = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *ResourceMetadata) SetVersion(v int64) *ResourceMetadata { + s.Version = &v + return s +} + +// An object representing a route returned by a describe operation. +type RouteData struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which the route resides. + // + // MeshName is a required field + MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` + + // The associated metadata for the route. + Metadata *ResourceMetadata `locationName:"metadata" type:"structure"` + + // The name of the route. + // + // RouteName is a required field + RouteName *string `locationName:"routeName" min:"1" type:"string" required:"true"` + + // The specifications of the route. + Spec *RouteSpec `locationName:"spec" type:"structure"` + + // The status of the route. + Status *RouteStatus `locationName:"status" type:"structure"` + + // The virtual router with which the route is associated. + // + // VirtualRouterName is a required field + VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RouteData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteData) GoString() string { + return s.String() +} + +// SetMeshName sets the MeshName field's value. +func (s *RouteData) SetMeshName(v string) *RouteData { + s.MeshName = &v + return s +} + +// SetMetadata sets the Metadata field's value. +func (s *RouteData) SetMetadata(v *ResourceMetadata) *RouteData { + s.Metadata = v + return s +} + +// SetRouteName sets the RouteName field's value. +func (s *RouteData) SetRouteName(v string) *RouteData { + s.RouteName = &v + return s +} + +// SetSpec sets the Spec field's value. +func (s *RouteData) SetSpec(v *RouteSpec) *RouteData { + s.Spec = v + return s +} + +// SetStatus sets the Status field's value. +func (s *RouteData) SetStatus(v *RouteStatus) *RouteData { + s.Status = v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *RouteData) SetVirtualRouterName(v string) *RouteData { + s.VirtualRouterName = &v + return s +} + +// An object representing a route returned by a list operation. +type RouteRef struct { + _ struct{} `type:"structure"` + + // The full Amazon Resource Name (ARN) for the route. + Arn *string `locationName:"arn" type:"string"` + + // The name of the service mesh in which the route resides. + MeshName *string `locationName:"meshName" min:"1" type:"string"` + + // The name of the route. + RouteName *string `locationName:"routeName" min:"1" type:"string"` + + // The virtual router with which the route is associated. + VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string"` +} + +// String returns the string representation +func (s RouteRef) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteRef) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *RouteRef) SetArn(v string) *RouteRef { + s.Arn = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *RouteRef) SetMeshName(v string) *RouteRef { + s.MeshName = &v + return s +} + +// SetRouteName sets the RouteName field's value. +func (s *RouteRef) SetRouteName(v string) *RouteRef { + s.RouteName = &v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *RouteRef) SetVirtualRouterName(v string) *RouteRef { + s.VirtualRouterName = &v + return s +} + +// An object representing the specification of a route. +type RouteSpec struct { + _ struct{} `type:"structure"` + + // The HTTP routing information for the route. + HttpRoute *HttpRoute `locationName:"httpRoute" type:"structure"` +} + +// String returns the string representation +func (s RouteSpec) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteSpec) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RouteSpec) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RouteSpec"} + if s.HttpRoute != nil { + if err := s.HttpRoute.Validate(); err != nil { + invalidParams.AddNested("HttpRoute", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHttpRoute sets the HttpRoute field's value. +func (s *RouteSpec) SetHttpRoute(v *HttpRoute) *RouteSpec { + s.HttpRoute = v + return s +} + +// An object representing the current status of a route. +type RouteStatus struct { + _ struct{} `type:"structure"` + + // The current status for the route. + Status *string `locationName:"status" type:"string" enum:"RouteStatusCode"` +} + +// String returns the string representation +func (s RouteStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteStatus) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *RouteStatus) SetStatus(v string) *RouteStatus { + s.Status = &v + return s +} + +// An object representing the service discovery information for a virtual node. +type ServiceDiscovery struct { + _ struct{} `type:"structure"` + + // Specifies the DNS service name for the virtual node. + Dns *DnsServiceDiscovery `locationName:"dns" type:"structure"` +} + +// String returns the string representation +func (s ServiceDiscovery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceDiscovery) GoString() string { + return s.String() +} + +// SetDns sets the Dns field's value. +func (s *ServiceDiscovery) SetDns(v *DnsServiceDiscovery) *ServiceDiscovery { + s.Dns = v + return s +} + +type UpdateRouteInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The name of the service mesh in which the route resides. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The name of the route to update. + // + // RouteName is a required field + RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"` + + // The new route specification to apply. This overwrites the existing data. + // + // Spec is a required field + Spec *RouteSpec `locationName:"spec" type:"structure" required:"true"` + + // The name of the virtual router with which the route is associated. + // + // VirtualRouterName is a required field + VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRouteInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.RouteName == nil { + invalidParams.Add(request.NewErrParamRequired("RouteName")) + } + if s.RouteName != nil && len(*s.RouteName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteName", 1)) + } + if s.Spec == nil { + invalidParams.Add(request.NewErrParamRequired("Spec")) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + if s.Spec != nil { + if err := s.Spec.Validate(); err != nil { + invalidParams.AddNested("Spec", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *UpdateRouteInput) SetClientToken(v string) *UpdateRouteInput { + s.ClientToken = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *UpdateRouteInput) SetMeshName(v string) *UpdateRouteInput { + s.MeshName = &v + return s +} + +// SetRouteName sets the RouteName field's value. +func (s *UpdateRouteInput) SetRouteName(v string) *UpdateRouteInput { + s.RouteName = &v + return s +} + +// SetSpec sets the Spec field's value. +func (s *UpdateRouteInput) SetSpec(v *RouteSpec) *UpdateRouteInput { + s.Spec = v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *UpdateRouteInput) SetVirtualRouterName(v string) *UpdateRouteInput { + s.VirtualRouterName = &v + return s +} + +type UpdateRouteOutput struct { + _ struct{} `type:"structure" payload:"Route"` + + // A full description of the route that was updated. + Route *RouteData `locationName:"route" type:"structure"` +} + +// String returns the string representation +func (s UpdateRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRouteOutput) GoString() string { + return s.String() +} + +// SetRoute sets the Route field's value. +func (s *UpdateRouteOutput) SetRoute(v *RouteData) *UpdateRouteOutput { + s.Route = v + return s +} + +type UpdateVirtualNodeInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The name of the service mesh in which the virtual node resides. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The new virtual node specification to apply. This overwrites the existing + // data. + // + // Spec is a required field + Spec *VirtualNodeSpec `locationName:"spec" type:"structure" required:"true"` + + // The name of the virtual node to update. + // + // VirtualNodeName is a required field + VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateVirtualNodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVirtualNodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVirtualNodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualNodeInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.Spec == nil { + invalidParams.Add(request.NewErrParamRequired("Spec")) + } + if s.VirtualNodeName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualNodeName")) + } + if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1)) + } + if s.Spec != nil { + if err := s.Spec.Validate(); err != nil { + invalidParams.AddNested("Spec", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *UpdateVirtualNodeInput) SetClientToken(v string) *UpdateVirtualNodeInput { + s.ClientToken = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *UpdateVirtualNodeInput) SetMeshName(v string) *UpdateVirtualNodeInput { + s.MeshName = &v + return s +} + +// SetSpec sets the Spec field's value. +func (s *UpdateVirtualNodeInput) SetSpec(v *VirtualNodeSpec) *UpdateVirtualNodeInput { + s.Spec = v + return s +} + +// SetVirtualNodeName sets the VirtualNodeName field's value. +func (s *UpdateVirtualNodeInput) SetVirtualNodeName(v string) *UpdateVirtualNodeInput { + s.VirtualNodeName = &v + return s +} + +type UpdateVirtualNodeOutput struct { + _ struct{} `type:"structure" payload:"VirtualNode"` + + // A full description of the virtual node that was updated. + VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"` +} + +// String returns the string representation +func (s UpdateVirtualNodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVirtualNodeOutput) GoString() string { + return s.String() +} + +// SetVirtualNode sets the VirtualNode field's value. +func (s *UpdateVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *UpdateVirtualNodeOutput { + s.VirtualNode = v + return s +} + +type UpdateVirtualRouterInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The name of the service mesh in which the virtual router resides. + // + // MeshName is a required field + MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` + + // The new virtual router specification to apply. This overwrites the existing + // data. + // + // Spec is a required field + Spec *VirtualRouterSpec `locationName:"spec" type:"structure" required:"true"` + + // The name of the virtual router to update. + // + // VirtualRouterName is a required field + VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateVirtualRouterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVirtualRouterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVirtualRouterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualRouterInput"} + if s.MeshName == nil { + invalidParams.Add(request.NewErrParamRequired("MeshName")) + } + if s.MeshName != nil && len(*s.MeshName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) + } + if s.Spec == nil { + invalidParams.Add(request.NewErrParamRequired("Spec")) + } + if s.VirtualRouterName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) + } + if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *UpdateVirtualRouterInput) SetClientToken(v string) *UpdateVirtualRouterInput { + s.ClientToken = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *UpdateVirtualRouterInput) SetMeshName(v string) *UpdateVirtualRouterInput { + s.MeshName = &v + return s +} + +// SetSpec sets the Spec field's value. +func (s *UpdateVirtualRouterInput) SetSpec(v *VirtualRouterSpec) *UpdateVirtualRouterInput { + s.Spec = v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *UpdateVirtualRouterInput) SetVirtualRouterName(v string) *UpdateVirtualRouterInput { + s.VirtualRouterName = &v + return s +} + +type UpdateVirtualRouterOutput struct { + _ struct{} `type:"structure" payload:"VirtualRouter"` + + // A full description of the virtual router that was updated. + VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"` +} + +// String returns the string representation +func (s UpdateVirtualRouterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVirtualRouterOutput) GoString() string { + return s.String() +} + +// SetVirtualRouter sets the VirtualRouter field's value. +func (s *UpdateVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *UpdateVirtualRouterOutput { + s.VirtualRouter = v + return s +} + +// An object representing a virtual node returned by a describe operation. +type VirtualNodeData struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which the virtual node resides. + // + // MeshName is a required field + MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` + + // The associated metadata for the virtual node. + Metadata *ResourceMetadata `locationName:"metadata" type:"structure"` + + // The specifications of the virtual node. + Spec *VirtualNodeSpec `locationName:"spec" type:"structure"` + + // The current status for the virtual node. + Status *VirtualNodeStatus `locationName:"status" type:"structure"` + + // The name of the virtual node. + // + // VirtualNodeName is a required field + VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s VirtualNodeData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualNodeData) GoString() string { + return s.String() +} + +// SetMeshName sets the MeshName field's value. +func (s *VirtualNodeData) SetMeshName(v string) *VirtualNodeData { + s.MeshName = &v + return s +} + +// SetMetadata sets the Metadata field's value. +func (s *VirtualNodeData) SetMetadata(v *ResourceMetadata) *VirtualNodeData { + s.Metadata = v + return s +} + +// SetSpec sets the Spec field's value. +func (s *VirtualNodeData) SetSpec(v *VirtualNodeSpec) *VirtualNodeData { + s.Spec = v + return s +} + +// SetStatus sets the Status field's value. +func (s *VirtualNodeData) SetStatus(v *VirtualNodeStatus) *VirtualNodeData { + s.Status = v + return s +} + +// SetVirtualNodeName sets the VirtualNodeName field's value. +func (s *VirtualNodeData) SetVirtualNodeName(v string) *VirtualNodeData { + s.VirtualNodeName = &v + return s +} + +// An object representing a virtual node returned by a list operation. +type VirtualNodeRef struct { + _ struct{} `type:"structure"` + + // The full Amazon Resource Name (ARN) for the virtual node. + Arn *string `locationName:"arn" type:"string"` + + // The name of the service mesh in which the virtual node resides. + MeshName *string `locationName:"meshName" min:"1" type:"string"` + + // The name of the virtual node. + VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string"` +} + +// String returns the string representation +func (s VirtualNodeRef) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualNodeRef) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *VirtualNodeRef) SetArn(v string) *VirtualNodeRef { + s.Arn = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *VirtualNodeRef) SetMeshName(v string) *VirtualNodeRef { + s.MeshName = &v + return s +} + +// SetVirtualNodeName sets the VirtualNodeName field's value. +func (s *VirtualNodeRef) SetVirtualNodeName(v string) *VirtualNodeRef { + s.VirtualNodeName = &v + return s +} + +// An object representing the specification of a virtual node. +type VirtualNodeSpec struct { + _ struct{} `type:"structure"` + + // The backends to which the virtual node is expected to send outbound traffic. + Backends []*string `locationName:"backends" type:"list"` + + // The listeners from which the virtual node is expected to receive inbound + // traffic. + Listeners []*Listener `locationName:"listeners" type:"list"` + + // The service discovery information for the virtual node. + ServiceDiscovery *ServiceDiscovery `locationName:"serviceDiscovery" type:"structure"` +} + +// String returns the string representation +func (s VirtualNodeSpec) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualNodeSpec) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VirtualNodeSpec) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VirtualNodeSpec"} + if s.Listeners != nil { + for i, v := range s.Listeners { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackends sets the Backends field's value. +func (s *VirtualNodeSpec) SetBackends(v []*string) *VirtualNodeSpec { + s.Backends = v + return s +} + +// SetListeners sets the Listeners field's value. +func (s *VirtualNodeSpec) SetListeners(v []*Listener) *VirtualNodeSpec { + s.Listeners = v + return s +} + +// SetServiceDiscovery sets the ServiceDiscovery field's value. +func (s *VirtualNodeSpec) SetServiceDiscovery(v *ServiceDiscovery) *VirtualNodeSpec { + s.ServiceDiscovery = v + return s +} + +// An object representing the current status of the virtual node. +type VirtualNodeStatus struct { + _ struct{} `type:"structure"` + + // The current status of the virtual node. + Status *string `locationName:"status" type:"string" enum:"VirtualNodeStatusCode"` +} + +// String returns the string representation +func (s VirtualNodeStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualNodeStatus) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *VirtualNodeStatus) SetStatus(v string) *VirtualNodeStatus { + s.Status = &v + return s +} + +// An object representing a virtual router returned by a describe operation. +type VirtualRouterData struct { + _ struct{} `type:"structure"` + + // The name of the service mesh in which the virtual router resides. + // + // MeshName is a required field + MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` + + // The associated metadata for the virtual router. + Metadata *ResourceMetadata `locationName:"metadata" type:"structure"` + + // The specifications of the virtual router. + Spec *VirtualRouterSpec `locationName:"spec" type:"structure"` + + // The current status of the virtual router. + Status *VirtualRouterStatus `locationName:"status" type:"structure"` + + // The name of the virtual router. + // + // VirtualRouterName is a required field + VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s VirtualRouterData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualRouterData) GoString() string { + return s.String() +} + +// SetMeshName sets the MeshName field's value. +func (s *VirtualRouterData) SetMeshName(v string) *VirtualRouterData { + s.MeshName = &v + return s +} + +// SetMetadata sets the Metadata field's value. +func (s *VirtualRouterData) SetMetadata(v *ResourceMetadata) *VirtualRouterData { + s.Metadata = v + return s +} + +// SetSpec sets the Spec field's value. +func (s *VirtualRouterData) SetSpec(v *VirtualRouterSpec) *VirtualRouterData { + s.Spec = v + return s +} + +// SetStatus sets the Status field's value. +func (s *VirtualRouterData) SetStatus(v *VirtualRouterStatus) *VirtualRouterData { + s.Status = v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *VirtualRouterData) SetVirtualRouterName(v string) *VirtualRouterData { + s.VirtualRouterName = &v + return s +} + +// An object representing a virtual router returned by a list operation. +type VirtualRouterRef struct { + _ struct{} `type:"structure"` + + // The full Amazon Resource Name (ARN) for the virtual router. + Arn *string `locationName:"arn" type:"string"` + + // The name of the service mesh in which the virtual router resides. + MeshName *string `locationName:"meshName" min:"1" type:"string"` + + // The name of the virtual router. + VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string"` +} + +// String returns the string representation +func (s VirtualRouterRef) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualRouterRef) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *VirtualRouterRef) SetArn(v string) *VirtualRouterRef { + s.Arn = &v + return s +} + +// SetMeshName sets the MeshName field's value. +func (s *VirtualRouterRef) SetMeshName(v string) *VirtualRouterRef { + s.MeshName = &v + return s +} + +// SetVirtualRouterName sets the VirtualRouterName field's value. +func (s *VirtualRouterRef) SetVirtualRouterName(v string) *VirtualRouterRef { + s.VirtualRouterName = &v + return s +} + +// An object representing the specification of a virtual router. +type VirtualRouterSpec struct { + _ struct{} `type:"structure"` + + // The service mesh service names to associate with the virtual router. + ServiceNames []*string `locationName:"serviceNames" type:"list"` +} + +// String returns the string representation +func (s VirtualRouterSpec) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualRouterSpec) GoString() string { + return s.String() +} + +// SetServiceNames sets the ServiceNames field's value. +func (s *VirtualRouterSpec) SetServiceNames(v []*string) *VirtualRouterSpec { + s.ServiceNames = v + return s +} + +// An object representing the status of a virtual router. +type VirtualRouterStatus struct { + _ struct{} `type:"structure"` + + // The current status of the virtual router. + Status *string `locationName:"status" type:"string" enum:"VirtualRouterStatusCode"` +} + +// String returns the string representation +func (s VirtualRouterStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualRouterStatus) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *VirtualRouterStatus) SetStatus(v string) *VirtualRouterStatus { + s.Status = &v + return s +} + +// An object representing a target and its relative weight. Traffic is distributed +// across targets according to their relative weight. For example, a weighted +// target with a relative weight of 50 receives five times as much traffic as +// one with a relative weight of 10. +type WeightedTarget struct { + _ struct{} `type:"structure"` + + // The virtual node to associate with the weighted target. + VirtualNode *string `locationName:"virtualNode" min:"1" type:"string"` + + // The relative weight of the weighted target. + Weight *int64 `locationName:"weight" type:"integer"` +} + +// String returns the string representation +func (s WeightedTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WeightedTarget) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WeightedTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WeightedTarget"} + if s.VirtualNode != nil && len(*s.VirtualNode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualNode", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVirtualNode sets the VirtualNode field's value. +func (s *WeightedTarget) SetVirtualNode(v string) *WeightedTarget { + s.VirtualNode = &v + return s +} + +// SetWeight sets the Weight field's value. +func (s *WeightedTarget) SetWeight(v int64) *WeightedTarget { + s.Weight = &v + return s +} + +const ( + // MeshStatusCodeActive is a MeshStatusCode enum value + MeshStatusCodeActive = "ACTIVE" + + // MeshStatusCodeDeleted is a MeshStatusCode enum value + MeshStatusCodeDeleted = "DELETED" + + // MeshStatusCodeInactive is a MeshStatusCode enum value + MeshStatusCodeInactive = "INACTIVE" +) + +const ( + // PortProtocolHttp is a PortProtocol enum value + PortProtocolHttp = "http" + + // PortProtocolTcp is a PortProtocol enum value + PortProtocolTcp = "tcp" +) + +const ( + // RouteStatusCodeActive is a RouteStatusCode enum value + RouteStatusCodeActive = "ACTIVE" + + // RouteStatusCodeDeleted is a RouteStatusCode enum value + RouteStatusCodeDeleted = "DELETED" + + // RouteStatusCodeInactive is a RouteStatusCode enum value + RouteStatusCodeInactive = "INACTIVE" +) + +const ( + // VirtualNodeStatusCodeActive is a VirtualNodeStatusCode enum value + VirtualNodeStatusCodeActive = "ACTIVE" + + // VirtualNodeStatusCodeDeleted is a VirtualNodeStatusCode enum value + VirtualNodeStatusCodeDeleted = "DELETED" + + // VirtualNodeStatusCodeInactive is a VirtualNodeStatusCode enum value + VirtualNodeStatusCodeInactive = "INACTIVE" +) + +const ( + // VirtualRouterStatusCodeActive is a VirtualRouterStatusCode enum value + VirtualRouterStatusCodeActive = "ACTIVE" + + // VirtualRouterStatusCodeDeleted is a VirtualRouterStatusCode enum value + VirtualRouterStatusCodeDeleted = "DELETED" + + // VirtualRouterStatusCodeInactive is a VirtualRouterStatusCode enum value + VirtualRouterStatusCodeInactive = "INACTIVE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go new file mode 100644 index 000000000..c0c1ce50a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go @@ -0,0 +1,44 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package appmesh provides the client and types for making API +// requests to AWS App Mesh. +// +// AWS App Mesh is a service mesh based on the Envoy proxy that makes it easy +// to monitor and control containerized microservices. App Mesh standardizes +// how your microservices communicate, giving you end-to-end visibility and +// helping to ensure high-availability for your applications. +// +// App Mesh gives you consistent visibility and network traffic controls for +// every microservice in an application. You can use App Mesh with Amazon ECS +// (using the Amazon EC2 launch type), Amazon EKS, and Kubernetes on AWS. +// +// App Mesh supports containerized microservice applications that use service +// discovery naming for their components. To use App Mesh, you must have a containerized +// application running on Amazon EC2 instances, hosted in either Amazon ECS, +// Amazon EKS, or Kubernetes on AWS. For more information about service discovery +// on Amazon ECS, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguideservice-discovery.html) +// in the Amazon Elastic Container Service Developer Guide. Kubernetes kube-dns +// is supported. For more information, see DNS for Services and Pods (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) +// in the Kubernetes documentation. +// +// See https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01 for more information on this service. +// +// See appmesh package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/appmesh/ +// +// Using the Client +// +// To contact AWS App Mesh 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 App Mesh client AppMesh for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/appmesh/#New +package appmesh diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go new file mode 100644 index 000000000..69ea820d8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go @@ -0,0 +1,69 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package appmesh + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // The request syntax was malformed. Check your request syntax and try again. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // The request contains a client token that was used for a previous update resource + // call with different specifications. Try the request again with a new client + // token. + ErrCodeConflictException = "ConflictException" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + // + // You do not have permissions to perform this action. + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + // + // The request processing has failed because of an unknown error, exception, + // or failure. + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // You have exceeded a service limit for your account. For more information, + // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) + // in the AWS App Mesh User Guide. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // The specified resource does not exist. Check your request syntax and try + // again. + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeResourceInUseException for service response error code + // "ResourceInUseException". + // + // You cannot delete the specified resource because it is in use or required + // by another resource. + ErrCodeResourceInUseException = "ResourceInUseException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + // + // The request has failed due to a temporary failure of the service. + ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // The maximum request rate permitted by the App Mesh APIs has been exceeded + // for your account. For best results, use an increasing or variable sleep interval + // between requests. + ErrCodeTooManyRequestsException = "TooManyRequestsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/service.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/service.go new file mode 100644 index 000000000..92ff26566 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package appmesh + +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" +) + +// AppMesh provides the API operation methods for making requests to +// AWS App Mesh. See this package's package overview docs +// for details on the service. +// +// AppMesh methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type AppMesh 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 = "App Mesh" // Name of service. + EndpointsID = "appmesh" // ID to lookup a service endpoint with. + ServiceID = "App Mesh" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the AppMesh 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 AppMesh client from just a session. +// svc := appmesh.New(mySession) +// +// // Create a AppMesh client with additional configuration +// svc := appmesh.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *AppMesh { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "appmesh" + } + 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) *AppMesh { + svc := &AppMesh{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-10-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 AppMesh operation and runs any +// custom request initialization. +func (c *AppMesh) 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/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go index 371d471eb..92f9197e2 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" @@ -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. @@ -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,6 +208,99 @@ 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 @@ -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" @@ -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. @@ -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. @@ -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. @@ -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,6 +770,97 @@ 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 @@ -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. @@ -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. @@ -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. @@ -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,6 +1236,93 @@ 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 @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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,6 +1958,96 @@ 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 @@ -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. @@ -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,6 +2224,96 @@ func (c *AppSync) ListResolversWithContext(ctx aws.Context, input *ListResolvers return out, req.Send() } +const opListResolversByFunction = "ListResolversByFunction" + +// 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 @@ -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. @@ -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. @@ -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. @@ -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,6 +2695,96 @@ 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 @@ -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. @@ -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. @@ -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,15 +3487,161 @@ func (s *CreateDataSourceOutput) SetDataSource(v *DataSource) *CreateDataSourceO return s } +type CreateFunctionInput 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 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 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 response mapping template. + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateFunctionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFunctionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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.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 *CreateFunctionInput) SetApiId(v string) *CreateFunctionInput { + s.ApiId = &v + return s +} + +// SetDataSourceName sets the DataSourceName field's value. +func (s *CreateFunctionInput) SetDataSourceName(v string) *CreateFunctionInput { + s.DataSourceName = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateFunctionInput) SetDescription(v string) *CreateFunctionInput { + s.Description = &v + return s +} + +// 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, IAM, or Amazon Cognito User Pools. + // 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. + // The Amazon CloudWatch Logs configuration. LogConfig *LogConfig `locationName:"logConfig" type:"structure"` // A user-supplied name for the GraphqlApi. @@ -2852,10 +3649,10 @@ type CreateGraphqlApiInput struct { // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` - // The Open Id Connect configuration configuration. + // The OpenID Connect configuration. OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` - // The Amazon Cognito User Pool configuration. + // The Amazon Cognito user pool configuration. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` } @@ -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"` @@ -4597,6 +5861,115 @@ func (s *ListGraphqlApisOutput) SetNextToken(v string) *ListGraphqlApisOutput { 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 ListResolversByFunctionOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolversByFunctionOutput) SetNextToken(v string) *ListResolversByFunctionOutput { + s.NextToken = &v + return s +} + +// SetResolvers sets the Resolvers field's value. +func (s *ListResolversByFunctionOutput) SetResolvers(v []*Resolver) *ListResolversByFunctionOutput { + s.Resolvers = v + return s +} + type ListResolversInput struct { _ struct{} `type:"structure"` @@ -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 5c109eaba..ac32f85d4 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 bbf510b94..6f8bdcf32 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" @@ -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 } @@ -1094,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 } 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 072ef51b3..2a822a5fb 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 @@ -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. @@ -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 } @@ -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 @@ -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 } @@ -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 } @@ -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 } @@ -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: @@ -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. // @@ -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, @@ -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) @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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. // @@ -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 f431b8aa3..32d9594c7 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 62dfc841f..6a8daca4a 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" @@ -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 } @@ -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. @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 9ca26f8aa..7bff348f4 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" @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 @@ -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 } @@ -624,6 +632,97 @@ 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 } @@ -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. // -// The ARN pattern for a budget is: arn:aws:budgetservice::AccountId:budget/budgetName +// This is the ARN pattern for a budget: +// +// 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"` + Threshold *float64 `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. + // 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 a4c64c2cb..918baf668 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: +// 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. // -// * Cost budgets allow you to say how much you want to spend on a service. +// Budgets provide you with a way to see the following information: // -// * Usage budgets allow you to say how many hours you want to use for one -// or more services. +// * How close your plan is to your budgeted amount or to the free tier limits // -// * RI utilization budgets allow you to define a utilization threshold and -// receive alerts when RIs are tracking below that threshold. +// * Your usage-to-date, including how much you've used of your Reserved +// Instances (RIs) // -// 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. +// * 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 1d00e9a71..abc4ea415 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" @@ -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 } @@ -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 } @@ -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 } 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 3c0078f1f..51c2b997a 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -1083,6 +1084,92 @@ 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 @@ -1381,6 +1468,147 @@ 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 @@ -1766,6 +1994,192 @@ 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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. // @@ -4357,8 +4771,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 +5025,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. + // 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. // - // 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). // 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/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/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/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/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 @@ -6066,6 +6523,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"` @@ -6244,6 +6864,143 @@ func (s *DescribeStackInstanceOutput) SetStackInstance(v *StackInstance) *Descri 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. + // + // StackName is a required field + StackName *string `min:"1" type:"string" required:"true"` + + // The resource drift status values to use as filters for the resource drift + // results returned. + // + // * DELETED: The resource differs from its expected template configuration + // in that the resource has been deleted. + // + // * 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 DescribeStackResourceDriftsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStackResourceDriftsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 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 s.StackResourceDriftStatusFilters != nil && len(s.StackResourceDriftStatusFilters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackResourceDriftStatusFilters", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeStackResourceDriftsInput) SetMaxResults(v int64) *DescribeStackResourceDriftsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeStackResourceDriftsInput) SetNextToken(v string) *DescribeStackResourceDriftsInput { + s.NextToken = &v + return s +} + +// SetStackName sets the StackName field's value. +func (s *DescribeStackResourceDriftsInput) SetStackName(v string) *DescribeStackResourceDriftsInput { + s.StackName = &v + return s +} + +// 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"` + + // 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 DescribeStackResourceDriftsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStackResourceDriftsOutput) GoString() string { + return s.String() +} + +// 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 +} + // The input for DescribeStackResource action. type DescribeStackResourceInput struct { _ struct{} `type:"structure"` @@ -6649,6 +7406,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"` @@ -8324,6 +9245,120 @@ func (s *ParameterDeclaration) SetParameterType(v string) *ParameterDeclaration 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 +} + // The ResourceChange structure describes the resource and the action that AWS // CloudFormation will perform on it if you execute this change set. type ResourceChange struct { @@ -8937,6 +9972,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/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 +10093,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 +10189,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 +10627,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/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 +10685,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 +10746,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/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 +10809,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 +10869,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/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/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 +11180,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 +11850,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/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 +11917,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 +12160,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. + // 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. // - // 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). // 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/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/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/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/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 @@ -11782,6 +13286,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 +13349,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 +13481,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 +13517,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 4445dd2ac..e7808318f 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,7 +13,7 @@ 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 @@ -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,7 +114,7 @@ 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 @@ -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 { @@ -244,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. // @@ -311,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() @@ -333,7 +337,7 @@ 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 @@ -358,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 { @@ -449,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. // @@ -518,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() @@ -540,7 +548,7 @@ 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 @@ -565,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 { @@ -621,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() @@ -643,7 +651,7 @@ 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 @@ -668,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 { @@ -723,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() @@ -745,7 +753,7 @@ 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 @@ -770,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 { @@ -821,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() @@ -843,7 +851,7 @@ 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 @@ -868,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 { @@ -908,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() @@ -930,7 +938,7 @@ 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 @@ -955,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 { @@ -1047,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() @@ -1069,7 +1077,7 @@ 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 @@ -1094,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 { @@ -1161,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() @@ -1183,7 +1191,7 @@ 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 @@ -1208,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 { @@ -1222,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 } @@ -1254,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() @@ -1276,7 +1283,7 @@ 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 @@ -1301,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 { @@ -1315,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 } @@ -1347,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() @@ -1369,7 +1375,7 @@ 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 @@ -1394,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 { @@ -1408,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 } @@ -1441,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() @@ -1463,7 +1468,7 @@ 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 @@ -1488,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 { @@ -1502,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 } @@ -1535,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() @@ -1557,7 +1561,7 @@ 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 @@ -1582,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 { @@ -1596,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 } @@ -1629,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() @@ -1651,7 +1654,7 @@ 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 @@ -1676,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 { @@ -1690,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 } @@ -1757,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() @@ -1779,7 +1781,7 @@ 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 @@ -1804,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 { @@ -1839,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() @@ -1861,7 +1863,7 @@ 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 @@ -1886,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 { @@ -1921,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() @@ -1943,7 +1945,7 @@ 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 @@ -1968,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 { @@ -2003,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() @@ -2025,7 +2027,7 @@ 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 @@ -2050,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 { @@ -2085,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() @@ -2107,7 +2109,7 @@ 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 @@ -2132,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 { @@ -2167,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() @@ -2189,7 +2191,7 @@ 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 @@ -2214,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 { @@ -2249,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() @@ -2271,7 +2273,7 @@ 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 @@ -2296,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 { @@ -2331,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() @@ -2353,7 +2355,7 @@ 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 @@ -2378,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 { @@ -2413,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() @@ -2435,7 +2437,7 @@ 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 @@ -2460,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 { @@ -2498,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() @@ -2520,7 +2522,7 @@ 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 @@ -2545,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 { @@ -2580,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() @@ -2602,7 +2604,7 @@ 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 @@ -2627,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 { @@ -2662,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() @@ -2684,7 +2686,7 @@ 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 @@ -2709,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 { @@ -2745,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() @@ -2767,7 +2769,7 @@ 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 @@ -2792,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 { @@ -2827,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() @@ -2849,7 +2851,7 @@ 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 @@ -2874,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"}, @@ -2912,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() @@ -2984,7 +2986,7 @@ 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 @@ -3009,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"}, @@ -3047,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() @@ -3119,7 +3121,7 @@ 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 @@ -3144,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 { @@ -3178,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() @@ -3200,7 +3202,7 @@ 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 @@ -3225,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 { @@ -3258,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() @@ -3280,7 +3282,7 @@ 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 @@ -3305,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 { @@ -3338,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() @@ -3360,7 +3362,7 @@ 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 @@ -3385,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"}, @@ -3429,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() @@ -3501,7 +3503,7 @@ 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 @@ -3526,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 { @@ -3558,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() @@ -3580,7 +3582,7 @@ 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 @@ -3605,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"}, @@ -3643,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() @@ -3715,7 +3717,7 @@ 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 @@ -3740,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 { @@ -3779,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() @@ -3801,7 +3803,7 @@ 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 @@ -3826,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 { @@ -3840,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 } @@ -3867,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() @@ -3889,7 +3890,7 @@ 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 @@ -3914,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 { @@ -3928,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 } @@ -3955,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() @@ -3977,7 +3977,7 @@ 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 @@ -4002,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 { @@ -4057,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() @@ -4079,7 +4079,7 @@ 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 @@ -4104,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 { @@ -4257,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. // @@ -4320,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() @@ -4342,7 +4346,7 @@ 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 @@ -4367,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 { @@ -4432,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() @@ -4454,7 +4458,7 @@ 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 @@ -4479,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 { @@ -4547,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() @@ -4569,7 +4573,7 @@ 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 @@ -4594,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 { @@ -4646,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() @@ -4668,7 +4672,7 @@ 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 @@ -4693,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 { @@ -4761,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() @@ -5747,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 @@ -5834,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 @@ -5921,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 @@ -6007,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 @@ -6093,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 @@ -6184,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 @@ -6203,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")) } @@ -6270,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 @@ -6356,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 @@ -6443,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 @@ -6484,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. @@ -7180,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 @@ -7277,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 @@ -7339,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 @@ -7401,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 @@ -7463,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 @@ -7526,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 @@ -7690,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"` @@ -7814,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 @@ -7997,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)) @@ -8080,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 @@ -8328,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"` @@ -8526,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 @@ -8947,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"` @@ -9495,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 @@ -9567,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 @@ -9640,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 @@ -9712,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 @@ -9783,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 @@ -9854,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 @@ -9925,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 @@ -9996,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 @@ -10072,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 @@ -10144,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 @@ -10214,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 @@ -10285,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 @@ -10357,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 @@ -10715,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"` @@ -10819,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. @@ -11059,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 @@ -11331,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 @@ -11656,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"` @@ -11679,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 @@ -11704,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 @@ -11874,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 @@ -12137,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 { @@ -12192,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"` @@ -12218,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)) } @@ -12359,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"` @@ -12493,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"` @@ -12994,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"` @@ -13103,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"` @@ -13722,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 @@ -13919,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 @@ -13981,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. // @@ -14012,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)) @@ -14082,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. // @@ -14113,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)) @@ -14182,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. // @@ -14213,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)) @@ -14282,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. // @@ -14313,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)) @@ -14390,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 @@ -14409,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")) } @@ -14490,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 @@ -14509,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 0a4319621..27960eab4 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 ede41494f..7cedc1e46 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 24b06e0a0..7fe4399de 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 index 08f4efc32..30dcd7da9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/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 opCopyBackupToRegion = "CopyBackupToRegion" @@ -1270,6 +1272,7 @@ func (c *CloudHSMV2) TagResourceRequest(input *TagResourceInput) (req *request.R output = &TagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1363,6 +1366,7 @@ func (c *CloudHSMV2) UntagResourceRequest(input *UntagResourceInput) (req *reque output = &UntagResourceOutput{} 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/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index 4ce19ade0..dccb979a4 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" @@ -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 } @@ -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) @@ -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) @@ -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) @@ -1209,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) @@ -1270,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 } @@ -1324,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) @@ -1385,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 } @@ -1427,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) @@ -1488,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 } @@ -1532,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) @@ -1694,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) @@ -1827,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. @@ -1932,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 @@ -1982,6 +2137,9 @@ 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: // @@ -2055,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 @@ -2277,7 +2441,10 @@ 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. @@ -3692,6 +3859,9 @@ 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: // @@ -3777,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 @@ -3862,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. @@ -3967,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 @@ -4017,6 +4210,9 @@ 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: // @@ -4090,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 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 b1246dca2..4fdd9a37b 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 @@ -13,12 +13,30 @@ const ( // 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". // @@ -196,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 3d0f003de..b7be8d6a1 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -1488,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 // @@ -1536,8 +1533,7 @@ func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *req // 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 about service-linked roles, see AWS service-linked role -// (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). +// 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 @@ -1611,17 +1607,16 @@ 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 } // PutMetricData API operation for Amazon CloudWatch. // -// Publishes metric data to Amazon CloudWatch. CloudWatch associates the data -// with the specified metric. If the specified metric does not 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. +// Publishes metric data points to Amazon CloudWatch. CloudWatch associates +// the data points with the specified metric. If the specified metric does not +// 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 @@ -1649,11 +1644,9 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque // 48 hours to become available for GetMetricData or GetMetricStatistics from // the time they are submitted. // -// CloudWatch needs raw data points to calculate percentile statistics. These -// raw data points could be published individually or as part of Values and -// Counts arrays. If you publish data using statistic sets in the StatisticValues -// field instead, you can only retrieve percentile statistics for this data -// if one of the following conditions is true: +// 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 and Min, Max, and Sum // are all equal. @@ -1741,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 } @@ -3536,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. @@ -3652,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"` @@ -3783,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 @@ -3849,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 @@ -3882,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"` } @@ -3962,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"` @@ -3983,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"` } @@ -4214,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"` @@ -4384,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 @@ -4402,7 +4426,7 @@ type PutMetricAlarmInput struct { // 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"` @@ -4419,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 @@ -4433,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. // @@ -4443,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 @@ -4463,28 +4488,39 @@ type PutMetricAlarmInput struct { // 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-idautoScalingGroupName/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 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 @@ -4498,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. @@ -4565,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)) } @@ -4599,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 @@ -4678,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 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 74817d4b5..69c41c660 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 @@ -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. // @@ -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. // @@ -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. // @@ -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. // @@ -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. // @@ -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. // @@ -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 } @@ -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. // @@ -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 16976e0d1..553efdee2 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 50712e294..30b9de6d9 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 f873b25cc..49c997cb7 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -1816,6 +1805,94 @@ 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 @@ -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 } @@ -2437,6 +2513,284 @@ 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 @@ -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 } @@ -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.) @@ -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 } @@ -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 } @@ -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 } @@ -3220,6 +3570,191 @@ func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input 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() +} + +// StopQueryWithContext is the same as StopQuery with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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() +} + const opTagLogGroup = "TagLogGroup" // TagLogGroupRequest generates a "aws/request.Request" representing the @@ -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 } @@ -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 { @@ -5998,6 +6865,40 @@ func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { 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 +} + +// SetPercent sets the Percent field's value. +func (s *LogGroupField) SetPercent(v int64) *LogGroupField { + s.Percent = &v + return s +} + // Represents a log stream, which is a sequence of log events from a single // emitter of logs. type LogStream struct { @@ -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 d8f3338b3..fb8754b55 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 5fb717088..35ba8422c 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" @@ -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 @@ -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,6 +516,88 @@ 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 @@ -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,6 +686,89 @@ 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 @@ -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 } @@ -998,6 +1168,80 @@ 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 @@ -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,16 @@ 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 @@ -1648,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. @@ -1787,6 +2036,12 @@ 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 @@ -1862,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 @@ -1987,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. @@ -2012,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 @@ -2072,12 +2333,12 @@ func (s *BuildPhase) SetStartTime(v time.Time) *BuildPhase { type CloudWatchLogsConfig struct { _ struct{} `type:"structure"` - // The group 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) + // 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 Amazon CloudWatch Logs for a build project. Valid - // values are: + // 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. // @@ -2087,7 +2348,7 @@ type CloudWatchLogsConfig struct { 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) + // 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"` } @@ -2140,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"` @@ -2154,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"` @@ -2163,8 +2424,8 @@ type CreateProjectInput struct { // Environment is a required field Environment *ProjectEnvironment `locationName:"environment" type:"structure" required:"true"` - // Information about logs for the build project. Logs can be Amazon CloudWatch - // Logs, uploaded to a specified S3 bucket, or both. + // 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. @@ -2172,6 +2433,9 @@ type CreateProjectInput struct { // 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"` @@ -2197,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. @@ -2233,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")) } @@ -2360,6 +2627,12 @@ func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { 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 @@ -2428,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. @@ -2481,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"` } @@ -2557,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"` @@ -2741,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 @@ -2797,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"` @@ -3084,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. @@ -3098,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"` @@ -3183,7 +3626,46 @@ func (s *ListProjectsOutput) SetProjects(v []*string) *ListProjectsOutput { return s } -// Information about logs for a build project. Logs can be Amazon CloudWatch +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"` @@ -3252,7 +3734,7 @@ type LogsLocation struct { // The name of the Amazon CloudWatch Logs group for the build logs. GroupName *string `locationName:"groupName" type:"string"` - // The URL to an individual build log in an S3 bucket. + // The URL to a build log in an S3 bucket. S3DeepLink *string `locationName:"s3DeepLink" type:"string"` // Information about S3 logs for a build project. @@ -3342,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. @@ -3401,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. @@ -3412,13 +3894,16 @@ type Project struct { // format. LastModified *time.Time `locationName:"lastModified" type:"timestamp"` - // Information about logs for the build project. A project can create Amazon - // CloudWatch Logs, logs in an S3 bucket, or both. + // 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"` @@ -3444,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"` } @@ -3528,6 +4013,12 @@ func (s *Project) SetName(v string) *Project { 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 @@ -3584,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. // @@ -3646,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"` @@ -3787,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"` } @@ -3822,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"` @@ -3881,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. @@ -3906,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: // @@ -4018,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. @@ -4040,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 @@ -4048,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. @@ -4199,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"` @@ -4311,14 +4807,15 @@ func (s *S3LogsConfig) SetStatus(v string) *S3LogsConfig { // 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. // @@ -4361,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"` @@ -4425,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. @@ -4449,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 + // 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. // @@ -4466,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, @@ -4505,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)) } @@ -4662,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 @@ -4867,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"` @@ -4881,15 +5435,15 @@ 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 Amazon - // CloudWatch Logs, logs in an S3 bucket, or both. + // 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. @@ -4899,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"` @@ -4950,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)) } @@ -5071,6 +5631,12 @@ func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput { 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 @@ -5139,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. @@ -5150,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"` } @@ -5223,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"` @@ -5278,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. @@ -5369,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" @@ -5463,6 +6047,9 @@ const ( // LanguageTypeBase is a LanguageType enum value LanguageTypeBase = "BASE" + + // LanguageTypePhp is a LanguageType enum value + LanguageTypePhp = "PHP" ) const ( @@ -5498,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 91c473e1d..ac6bf6287 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 56b344299..2f8d260bd 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 @@ -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 } @@ -4581,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 } @@ -5007,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 } @@ -5122,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 } 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 290e541db..274ca2a32 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 @@ -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 } @@ -366,6 +365,10 @@ 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 applicable 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) @@ -414,7 +417,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 +440,12 @@ 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 considered 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 @@ -461,7 +473,12 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymen // * 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 +493,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,6 +502,115 @@ 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 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 does not exist with the applicable IAM user or AWS account. +// +// * ErrCodeDeploymentTargetIdRequiredException "DeploymentTargetIdRequiredException" +// A deployment target ID was not provided. +// +// * ErrCodeInvalidDeploymentTargetIdException "InvalidDeploymentTargetIdException" +// The target ID provide 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 @@ -692,8 +820,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 } @@ -732,6 +859,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) @@ -1268,6 +1401,19 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // * ErrCodeInvalidInputException "InvalidInputException" // The specified 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 ECS service can only be associated with 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) { req, out := c.CreateDeploymentGroupRequest(input) @@ -1329,8 +1475,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 } @@ -1413,8 +1558,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 } @@ -1690,8 +1834,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 } @@ -2063,6 +2206,9 @@ func (c *CodeDeploy) GetDeploymentConfigRequest(input *GetDeploymentConfigInput) // The deployment configuration does not exist with the applicable 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) { req, out := c.GetDeploymentConfigRequest(input) @@ -2158,6 +2304,10 @@ func (c *CodeDeploy) GetDeploymentGroupRequest(input *GetDeploymentGroupInput) ( // The named deployment group does not exist with the applicable IAM user or // AWS account. // +// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" +// The deployment configuration does not exist with the applicable 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) { req, out := c.GetDeploymentGroupRequest(input) @@ -2206,7 +2356,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", @@ -2252,7 +2407,12 @@ func (c *CodeDeploy) GetDeploymentInstanceRequest(input *GetDeploymentInstanceIn // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" // The specified 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 +2427,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,6 +2436,103 @@ 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 does not exist with the applicable IAM user or AWS account. +// +// * ErrCodeDeploymentTargetIdRequiredException "DeploymentTargetIdRequiredException" +// A deployment target ID was not provided. +// +// * ErrCodeInvalidDeploymentTargetIdException "InvalidDeploymentTargetIdException" +// The target ID provide was not valid. +// +// * ErrCodeDeploymentTargetDoesNotExistException "DeploymentTargetDoesNotExistException" +// The provided target ID does not belong to the attempted deployment. +// +// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" +// The specified 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 @@ -2963,7 +3222,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,6 +3251,10 @@ func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstanc // ListDeploymentInstances API operation for AWS CodeDeploy. // +// 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 applicable IAM user // or AWS account. // @@ -3025,7 +3293,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 +3316,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 +3342,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 +3355,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,6 +3379,109 @@ func (c *CodeDeploy) ListDeploymentInstancesPagesWithContext(ctx aws.Context, in return p.Err() } +const opListDeploymentTargets = "ListDeploymentTargets" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/ListDeploymentTargets +func (c *CodeDeploy) ListDeploymentTargetsRequest(input *ListDeploymentTargetsInput) (req *request.Request, output *ListDeploymentTargetsOutput) { + op := &request.Operation{ + Name: opListDeploymentTargets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListDeploymentTargetsInput{} + } + + output = &ListDeploymentTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDeploymentTargets API operation for AWS CodeDeploy. +// +// 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 ListDeploymentTargets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" +// At least one deployment ID must be specified. +// +// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" +// The deployment does not exist with the applicable IAM user or AWS account. +// +// * ErrCodeDeploymentNotStartedException "DeploymentNotStartedException" +// The specified deployment has not started. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The next token was specified in an invalid format. +// +// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" +// At least one of the deployment IDs was specified in an invalid format. +// +// * ErrCodeInvalidInstanceStatusException "InvalidInstanceStatusException" +// The specified instance status does not exist. +// +// * 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. +// +// * 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/ListDeploymentTargets +func (c *CodeDeploy) ListDeploymentTargets(input *ListDeploymentTargetsInput) (*ListDeploymentTargetsOutput, error) { + req, out := c.ListDeploymentTargetsRequest(input) + return out, req.Send() +} + +// ListDeploymentTargetsWithContext is the same as ListDeploymentTargets with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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() +} + const opListDeployments = "ListDeployments" // ListDeploymentsRequest generates a "aws/request.Request" representing the @@ -3572,8 +3957,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 } @@ -3668,8 +4052,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 } @@ -3782,8 +4165,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 } @@ -3869,7 +4251,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,8 +4269,7 @@ 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 } @@ -3919,6 +4305,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 +4321,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) @@ -4000,6 +4390,10 @@ func (c *CodeDeploy) StopDeploymentRequest(input *StopDeploymentInput) (req *req // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" // The deployment does not exist with the applicable IAM user or AWS account. // +// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" +// The named deployment group does not exist with the applicable IAM user or +// AWS account. +// // * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" // The deployment is already complete. // @@ -4067,8 +4461,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 } @@ -4275,6 +4668,19 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // * ErrCodeInvalidInputException "InvalidInputException" // The specified 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 ECS service can only be associated with 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) { req, out := c.UpdateDeploymentGroupRequest(input) @@ -4443,6 +4849,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"` @@ -4842,7 +5295,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 of the deployment. // // InstanceIds is a required field InstanceIds []*string `locationName:"instanceIds" type:"list" required:"true"` @@ -4919,6 +5372,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 +5666,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 +5692,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"` } @@ -5414,6 +5956,12 @@ type CreateDeploymentGroupInput struct { // be used in the same call as ec2TagFilters. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` + // The target ECS services in the deployment group. This only applies to deployment + // groups that use the Amazon ECS compute platform. A target 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"` @@ -5537,6 +6085,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 @@ -5754,7 +6308,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"` } @@ -6140,6 +6694,12 @@ type DeploymentGroupInfo struct { // be used in the same call as ec2TagFilters. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` + // The target ECS services in the deployment group. This only applies to deployment + // groups that use the Amazon ECS compute platform. A target 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 +6813,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 @@ -6343,7 +6909,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. @@ -6750,6 +7316,60 @@ func (s *DeploymentStyle) SetDeploymentType(v string) *DeploymentStyle { return s } +// Information about the deployment target. +type DeploymentTarget struct { + _ struct{} `type:"structure"` + + // The deployment type which 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"` @@ -6945,6 +7565,228 @@ func (s *EC2TagSet) SetEc2TagSetList(v [][]*EC2TagFilter) *EC2TagSet { return s } +// Contains the service and cluster names used to identify an Amazon ECS deployment's +// target. +type ECSService struct { + _ struct{} `type:"structure"` + + // The name of the cluster that the ECS service is associated with. + ClusterName *string `locationName:"clusterName" type:"string"` + + // The name of the target 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 +} + +// A set of Amazon ECS tasks. A task set runs a specified number of instances +// of a task definition simultaneously inside an Amazon ECS service. 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 or +// not. +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 asks 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. @@ -7428,7 +8270,8 @@ 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 applicable IAM user or + // AWS account. // // DeploymentId is a required field DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` @@ -7521,7 +8364,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 +8407,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 updated last. 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 +8676,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. @@ -7811,7 +8714,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,6 +8763,155 @@ 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 { @@ -7869,7 +8921,7 @@ type LastDeploymentInfo struct { // 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 @@ -8008,13 +9060,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. @@ -8212,9 +9264,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"` } @@ -8483,6 +9534,82 @@ 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 will also + // be 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"` @@ -8771,6 +9898,10 @@ type LoadBalancerInfo struct { // // 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 +9926,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"` @@ -8882,7 +10019,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 +10087,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"` } @@ -9241,6 +10380,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"` @@ -9260,7 +10403,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 +10416,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 @@ -9420,7 +10569,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"` } @@ -9653,6 +10802,54 @@ func (s *TargetGroupInfo) SetName(v string) *TargetGroupInfo { return s } +// Information about two target groups and how traffic routes 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 target is associated with the task set that serves traffic after + // the deployment completes. + 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 happen 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 +11010,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 { @@ -10016,6 +11240,12 @@ type UpdateDeploymentGroupInput struct { // group will include only EC2 instances identified by all the tag groups. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` + // The target ECS services in the deployment group. This only applies to deployment + // groups that use the Amazon ECS compute platform. A target 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"` @@ -10138,6 +11368,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 +11483,9 @@ const ( // ComputePlatformLambda is a ComputePlatform enum value ComputePlatformLambda = "Lambda" + + // ComputePlatformEcs is a ComputePlatform enum value + ComputePlatformEcs = "ECS" ) const ( @@ -10299,6 +11538,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 +11557,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 +11654,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 +11802,9 @@ const ( // RevisionLocationTypeString is a RevisionLocationType enum value RevisionLocationTypeString = "String" + + // RevisionLocationTypeAppSpecContent is a RevisionLocationType enum value + RevisionLocationTypeAppSpecContent = "AppSpecContent" ) const ( @@ -10561,6 +11834,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/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go index c3af4b0dd..bdf5503f5 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 @@ -141,12 +141,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 ECS service can only be associated with one deployment group. + ErrCodeECSServiceMappingLimitExceededException = "ECSServiceMappingLimitExceededException" + // ErrCodeGitHubAccountTokenDoesNotExistException for service response error code // "GitHubAccountTokenDoesNotExistException". // @@ -323,6 +351,18 @@ const ( // and "WITHOUT_TRAFFIC_CONTROL". ErrCodeInvalidDeploymentStyleException = "InvalidDeploymentStyleException" + // ErrCodeInvalidDeploymentTargetIdException for service response error code + // "InvalidDeploymentTargetIdException". + // + // The target ID provide 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,6 +376,12 @@ 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". // @@ -498,6 +544,18 @@ const ( // The specified 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". // 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 87a678f08..0d1d4f22e 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 ffafc65c2..782226a7f 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } 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 3187edea3..0b0cbb9f3 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -10037,6 +10051,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 +10416,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 +10501,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 +10667,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 +10709,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 +10873,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 +10957,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 +11101,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 +11176,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 +11256,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 +11346,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 +11444,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 +11533,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 +11661,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 +11998,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 +12111,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 +12223,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 +12334,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 +12419,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 +12520,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 +12697,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 +12788,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 +12890,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 +12992,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 +13092,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 +13186,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 +13361,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 +13409,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 +13449,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 +13584,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 +13688,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 +13911,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 +14017,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 +14028,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 +14043,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 +14162,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 +14179,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 +14189,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 @@ -15767,7 +15782,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 +15853,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 +15906,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 +16270,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 +16435,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 +17047,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 +17118,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 +17133,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 +17309,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 +17615,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 +17697,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 +17781,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 +17838,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 +17970,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 +18285,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 +18603,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 +20096,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 +20110,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 +20346,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 +20494,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 @@ -20716,7 +20731,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 +20846,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 +20943,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 +21128,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 +21210,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 +21235,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 +21770,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 +21848,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 +21863,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 +21961,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 +22383,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 +22512,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"` @@ -23185,7 +23200,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 +23280,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 +23880,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 +24034,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 +24142,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 fdeb82bec..bf62e4031 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,6 +13,96 @@ 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -2350,6 +2434,192 @@ 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 @@ -2964,6 +3234,104 @@ func (c *ConfigService) GetResourceConfigHistoryPagesWithContext(ctx aws.Context return p.Err() } +const opListAggregateDiscoveredResources = "ListAggregateDiscoveredResources" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/ListAggregateDiscoveredResources +func (c *ConfigService) ListAggregateDiscoveredResourcesRequest(input *ListAggregateDiscoveredResourcesInput) (req *request.Request, output *ListAggregateDiscoveredResourcesOutput) { + op := &request.Operation{ + Name: opListAggregateDiscoveredResources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListAggregateDiscoveredResourcesInput{} + } + + output = &ListAggregateDiscoveredResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAggregateDiscoveredResources API operation for AWS Config. +// +// 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. +// +// 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 ListAggregateDiscoveredResources 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/ListAggregateDiscoveredResources +func (c *ConfigService) ListAggregateDiscoveredResources(input *ListAggregateDiscoveredResourcesInput) (*ListAggregateDiscoveredResourcesOutput, error) { + req, out := c.ListAggregateDiscoveredResourcesRequest(input) + return out, req.Send() +} + +// ListAggregateDiscoveredResourcesWithContext is the same as ListAggregateDiscoveredResources with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opListDiscoveredResources = "ListDiscoveredResources" // ListDiscoveredResourcesRequest generates a "aws/request.Request" representing the @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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,6 +8815,229 @@ func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetNextToken(v string) * return s } +type GetAggregateDiscoveredResourceCountsInput 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 ResourceCountFilters object. + Filters *ResourceCountFilters `type:"structure"` + + // 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"` @@ -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 02ce16d3a..4ffa6dbdc 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 742254525..831d8d4bd 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" @@ -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 } @@ -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 @@ -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 } @@ -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 @@ -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 @@ -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 @@ -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 } @@ -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 @@ -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 + // Shorthand syntax for these attributes is as follows: ServiceAccessRoleArn=string,BucketName=string,CompressionType=string // - // JSON syntax: - // - // { "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 + // Shorthand syntax for these attributes is as follows: ServiceAccessRoleArn=string,BucketName=string,CompressionType=string // - // JSON syntax: - // - // { "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 ed8b2a336..9820993c6 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 000000000..225f2d58c --- /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/datasync/api.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/api.go new file mode 100644 index 000000000..3d4af4d2a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/datasync/api.go @@ -0,0 +1,5506 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package datasync + +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 opCancelTaskExecution = "CancelTaskExecution" + +// CancelTaskExecutionRequest generates a "aws/request.Request" representing the +// client's request for the CancelTaskExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelTaskExecution for more information on using the CancelTaskExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelTaskExecutionRequest method. +// req, resp := client.CancelTaskExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CancelTaskExecution +func (c *DataSync) CancelTaskExecutionRequest(input *CancelTaskExecutionInput) (req *request.Request, output *CancelTaskExecutionOutput) { + op := &request.Operation{ + Name: opCancelTaskExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelTaskExecutionInput{} + } + + output = &CancelTaskExecutionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// CancelTaskExecution API operation for AWS DataSync. +// +// Cancels execution of a task. +// +// When you cancel a task execution, the transfer of some files are abruptly +// interrupted. The contents of files that are transferred to the destination +// might be incomplete or inconsistent with the source files. However, if you +// start a new task execution on the same task and you allow the task execution +// to complete, file content on the destination is complete and consistent. +// This applies to other unexpected failures that interrupt a task execution. +// In all of these cases, AWS DataSync successfully complete the transfer when +// you start the next task execution. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation CancelTaskExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CancelTaskExecution +func (c *DataSync) CancelTaskExecution(input *CancelTaskExecutionInput) (*CancelTaskExecutionOutput, error) { + req, out := c.CancelTaskExecutionRequest(input) + return out, req.Send() +} + +// CancelTaskExecutionWithContext is the same as CancelTaskExecution with the addition of +// the ability to pass a context and additional request options. +// +// See CancelTaskExecution for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) CancelTaskExecutionWithContext(ctx aws.Context, input *CancelTaskExecutionInput, opts ...request.Option) (*CancelTaskExecutionOutput, error) { + req, out := c.CancelTaskExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateAgent = "CreateAgent" + +// CreateAgentRequest generates a "aws/request.Request" representing the +// client's request for the CreateAgent operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateAgent for more information on using the CreateAgent +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateAgentRequest method. +// req, resp := client.CreateAgentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent +func (c *DataSync) CreateAgentRequest(input *CreateAgentInput) (req *request.Request, output *CreateAgentOutput) { + op := &request.Operation{ + Name: opCreateAgent, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateAgentInput{} + } + + output = &CreateAgentOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateAgent API operation for AWS DataSync. +// +// Activates an AWS DataSync agent that you have deployed on your host. The +// activation process associates your agent with your account. In the activation +// process, you specify information such as the AWS Region that you want to +// activate the agent in. You activate the agent in the AWS Region where your +// target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created +// in this AWS Region. +// +// You can use an agent for more than one location. If a task uses multiple +// agents, all of them need to have status AVAILABLE for the task to run. If +// you use multiple agents for a source location, the status of all the agents +// must be AVAILABLE for the task to run. For more information, see Activating +// a Sync Agent (https://docs.aws.amazon.com/sync-service/latest/userguide/working-with-sync-agents.html#activating-sync-agent) +// in the AWS DataSync User Guide. +// +// Agents are automatically updated by AWS on a regular basis, using a mechanism +// that ensures minimal interruption to your tasks. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation CreateAgent for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent +func (c *DataSync) CreateAgent(input *CreateAgentInput) (*CreateAgentOutput, error) { + req, out := c.CreateAgentRequest(input) + return out, req.Send() +} + +// CreateAgentWithContext is the same as CreateAgent with the addition of +// the ability to pass a context and additional request options. +// +// See CreateAgent for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) CreateAgentWithContext(ctx aws.Context, input *CreateAgentInput, opts ...request.Option) (*CreateAgentOutput, error) { + req, out := c.CreateAgentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateLocationEfs = "CreateLocationEfs" + +// CreateLocationEfsRequest generates a "aws/request.Request" representing the +// client's request for the CreateLocationEfs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLocationEfs for more information on using the CreateLocationEfs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLocationEfsRequest method. +// req, resp := client.CreateLocationEfsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs +func (c *DataSync) CreateLocationEfsRequest(input *CreateLocationEfsInput) (req *request.Request, output *CreateLocationEfsOutput) { + op := &request.Operation{ + Name: opCreateLocationEfs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateLocationEfsInput{} + } + + output = &CreateLocationEfsOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLocationEfs API operation for AWS DataSync. +// +// Creates an endpoint for an Amazon EFS file system. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation CreateLocationEfs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs +func (c *DataSync) CreateLocationEfs(input *CreateLocationEfsInput) (*CreateLocationEfsOutput, error) { + req, out := c.CreateLocationEfsRequest(input) + return out, req.Send() +} + +// CreateLocationEfsWithContext is the same as CreateLocationEfs with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLocationEfs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) CreateLocationEfsWithContext(ctx aws.Context, input *CreateLocationEfsInput, opts ...request.Option) (*CreateLocationEfsOutput, error) { + req, out := c.CreateLocationEfsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateLocationNfs = "CreateLocationNfs" + +// CreateLocationNfsRequest generates a "aws/request.Request" representing the +// client's request for the CreateLocationNfs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLocationNfs for more information on using the CreateLocationNfs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLocationNfsRequest method. +// req, resp := client.CreateLocationNfsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs +func (c *DataSync) CreateLocationNfsRequest(input *CreateLocationNfsInput) (req *request.Request, output *CreateLocationNfsOutput) { + op := &request.Operation{ + Name: opCreateLocationNfs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateLocationNfsInput{} + } + + output = &CreateLocationNfsOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLocationNfs API operation for AWS DataSync. +// +// Creates an endpoint for a Network File System (NFS) file system. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation CreateLocationNfs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs +func (c *DataSync) CreateLocationNfs(input *CreateLocationNfsInput) (*CreateLocationNfsOutput, error) { + req, out := c.CreateLocationNfsRequest(input) + return out, req.Send() +} + +// CreateLocationNfsWithContext is the same as CreateLocationNfs with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLocationNfs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) CreateLocationNfsWithContext(ctx aws.Context, input *CreateLocationNfsInput, opts ...request.Option) (*CreateLocationNfsOutput, error) { + req, out := c.CreateLocationNfsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateLocationS3 = "CreateLocationS3" + +// CreateLocationS3Request generates a "aws/request.Request" representing the +// client's request for the CreateLocationS3 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLocationS3 for more information on using the CreateLocationS3 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLocationS3Request method. +// req, resp := client.CreateLocationS3Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3 +func (c *DataSync) CreateLocationS3Request(input *CreateLocationS3Input) (req *request.Request, output *CreateLocationS3Output) { + op := &request.Operation{ + Name: opCreateLocationS3, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateLocationS3Input{} + } + + output = &CreateLocationS3Output{} + req = c.newRequest(op, input, output) + return +} + +// CreateLocationS3 API operation for AWS DataSync. +// +// Creates an endpoint for an Amazon S3 bucket. +// +// For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity +// and Access Management (IAM) role that has the required permissions. You can +// set up the required permissions by creating an IAM policy that grants the +// required permissions and attaching the policy to the role. An example of +// such a policy is shown in the examples section. For more information, see +// Configuring Amazon S3 Location Settings (https://docs.aws.amazon.com/sync-service/latest/userguide/configuring-s3-locations.html) +// in the AWS DataSync 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 DataSync's +// API operation CreateLocationS3 for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3 +func (c *DataSync) CreateLocationS3(input *CreateLocationS3Input) (*CreateLocationS3Output, error) { + req, out := c.CreateLocationS3Request(input) + return out, req.Send() +} + +// CreateLocationS3WithContext is the same as CreateLocationS3 with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLocationS3 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) CreateLocationS3WithContext(ctx aws.Context, input *CreateLocationS3Input, opts ...request.Option) (*CreateLocationS3Output, error) { + req, out := c.CreateLocationS3Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTask = "CreateTask" + +// CreateTaskRequest generates a "aws/request.Request" representing the +// client's request for the CreateTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTask for more information on using the CreateTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTaskRequest method. +// req, resp := client.CreateTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask +func (c *DataSync) CreateTaskRequest(input *CreateTaskInput) (req *request.Request, output *CreateTaskOutput) { + op := &request.Operation{ + Name: opCreateTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTaskInput{} + } + + output = &CreateTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTask API operation for AWS DataSync. +// +// Creates a task. A task is a set of two locations (source and destination) +// and a set of default OverrideOptions that you use to control the behavior +// of a task. If you don't specify default values for Options when you create +// a task, AWS DataSync populates them with safe service defaults. +// +// When you initially create a task, it enters the INITIALIZING status and then +// the CREATING status. In CREATING status, AWS DataSync attempts to mount the +// source Network File System (NFS) location. The task transitions to the AVAILABLE +// status without waiting for the destination location to mount. Instead, AWS +// DataSync mounts a destination before every task execution and then unmounts +// it after every task execution. +// +// If an agent that is associated with a source (NFS) location goes offline, +// the task transitions to the UNAVAILABLE status. If the status of the task +// remains in the CREATING status for more than a few minutes, it means that +// your agent might be having trouble mounting the source NFS file system. Check +// the task's ErrorCode and ErrorDetail. Mount issues are often caused by either +// a misconfigured firewall or a mistyped NFS server host 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 AWS DataSync's +// API operation CreateTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask +func (c *DataSync) CreateTask(input *CreateTaskInput) (*CreateTaskOutput, error) { + req, out := c.CreateTaskRequest(input) + return out, req.Send() +} + +// CreateTaskWithContext is the same as CreateTask with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) CreateTaskWithContext(ctx aws.Context, input *CreateTaskInput, opts ...request.Option) (*CreateTaskOutput, error) { + req, out := c.CreateTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteAgent = "DeleteAgent" + +// DeleteAgentRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAgent operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAgent for more information on using the DeleteAgent +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAgentRequest method. +// req, resp := client.DeleteAgentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent +func (c *DataSync) DeleteAgentRequest(input *DeleteAgentInput) (req *request.Request, output *DeleteAgentOutput) { + op := &request.Operation{ + Name: opDeleteAgent, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteAgentInput{} + } + + output = &DeleteAgentOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteAgent API operation for AWS DataSync. +// +// Deletes an agent. To specify which agent to delete, use the Amazon Resource +// Name (ARN) of the agent in your request. The operation disassociates the +// agent from your AWS account. However, it doesn't delete the agent virtual +// machine (VM) from your on-premises environment. +// +// After you delete an agent, you can't reactivate it and you longer pay software +// charges for 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 DataSync's +// API operation DeleteAgent for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent +func (c *DataSync) DeleteAgent(input *DeleteAgentInput) (*DeleteAgentOutput, error) { + req, out := c.DeleteAgentRequest(input) + return out, req.Send() +} + +// DeleteAgentWithContext is the same as DeleteAgent with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAgent for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DeleteAgentWithContext(ctx aws.Context, input *DeleteAgentInput, opts ...request.Option) (*DeleteAgentOutput, error) { + req, out := c.DeleteAgentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteLocation = "DeleteLocation" + +// DeleteLocationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLocation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLocation for more information on using the DeleteLocation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLocationRequest method. +// req, resp := client.DeleteLocationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation +func (c *DataSync) DeleteLocationRequest(input *DeleteLocationInput) (req *request.Request, output *DeleteLocationOutput) { + op := &request.Operation{ + Name: opDeleteLocation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLocationInput{} + } + + output = &DeleteLocationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteLocation API operation for AWS DataSync. +// +// Deletes the configuration of a location used by AWS DataSync. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation DeleteLocation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation +func (c *DataSync) DeleteLocation(input *DeleteLocationInput) (*DeleteLocationOutput, error) { + req, out := c.DeleteLocationRequest(input) + return out, req.Send() +} + +// DeleteLocationWithContext is the same as DeleteLocation with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLocation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DeleteLocationWithContext(ctx aws.Context, input *DeleteLocationInput, opts ...request.Option) (*DeleteLocationOutput, error) { + req, out := c.DeleteLocationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTask = "DeleteTask" + +// DeleteTaskRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTask for more information on using the DeleteTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTaskRequest method. +// req, resp := client.DeleteTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask +func (c *DataSync) DeleteTaskRequest(input *DeleteTaskInput) (req *request.Request, output *DeleteTaskOutput) { + op := &request.Operation{ + Name: opDeleteTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTaskInput{} + } + + output = &DeleteTaskOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteTask API operation for AWS DataSync. +// +// Deletes a task. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation DeleteTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask +func (c *DataSync) DeleteTask(input *DeleteTaskInput) (*DeleteTaskOutput, error) { + req, out := c.DeleteTaskRequest(input) + return out, req.Send() +} + +// DeleteTaskWithContext is the same as DeleteTask with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DeleteTaskWithContext(ctx aws.Context, input *DeleteTaskInput, opts ...request.Option) (*DeleteTaskOutput, error) { + req, out := c.DeleteTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAgent = "DescribeAgent" + +// DescribeAgentRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAgent operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAgent for more information on using the DescribeAgent +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAgentRequest method. +// req, resp := client.DescribeAgentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent +func (c *DataSync) DescribeAgentRequest(input *DescribeAgentInput) (req *request.Request, output *DescribeAgentOutput) { + op := &request.Operation{ + Name: opDescribeAgent, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAgentInput{} + } + + output = &DescribeAgentOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAgent API operation for AWS DataSync. +// +// Returns metadata such as the name, the network interfaces, and the status +// (that is, whether the agent is running or not) for an agent. To specify which +// agent to describe, use the Amazon Resource Name (ARN) of the agent in your +// 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 AWS DataSync's +// API operation DescribeAgent for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent +func (c *DataSync) DescribeAgent(input *DescribeAgentInput) (*DescribeAgentOutput, error) { + req, out := c.DescribeAgentRequest(input) + return out, req.Send() +} + +// DescribeAgentWithContext is the same as DescribeAgent with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAgent for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DescribeAgentWithContext(ctx aws.Context, input *DescribeAgentInput, opts ...request.Option) (*DescribeAgentOutput, error) { + req, out := c.DescribeAgentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeLocationEfs = "DescribeLocationEfs" + +// DescribeLocationEfsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLocationEfs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeLocationEfs for more information on using the DescribeLocationEfs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeLocationEfsRequest method. +// req, resp := client.DescribeLocationEfsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs +func (c *DataSync) DescribeLocationEfsRequest(input *DescribeLocationEfsInput) (req *request.Request, output *DescribeLocationEfsOutput) { + op := &request.Operation{ + Name: opDescribeLocationEfs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeLocationEfsInput{} + } + + output = &DescribeLocationEfsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeLocationEfs API operation for AWS DataSync. +// +// Returns metadata, such as the path information about an Amazon EFS 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 DataSync's +// API operation DescribeLocationEfs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs +func (c *DataSync) DescribeLocationEfs(input *DescribeLocationEfsInput) (*DescribeLocationEfsOutput, error) { + req, out := c.DescribeLocationEfsRequest(input) + return out, req.Send() +} + +// DescribeLocationEfsWithContext is the same as DescribeLocationEfs with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeLocationEfs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DescribeLocationEfsWithContext(ctx aws.Context, input *DescribeLocationEfsInput, opts ...request.Option) (*DescribeLocationEfsOutput, error) { + req, out := c.DescribeLocationEfsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeLocationNfs = "DescribeLocationNfs" + +// DescribeLocationNfsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLocationNfs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeLocationNfs for more information on using the DescribeLocationNfs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeLocationNfsRequest method. +// req, resp := client.DescribeLocationNfsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs +func (c *DataSync) DescribeLocationNfsRequest(input *DescribeLocationNfsInput) (req *request.Request, output *DescribeLocationNfsOutput) { + op := &request.Operation{ + Name: opDescribeLocationNfs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeLocationNfsInput{} + } + + output = &DescribeLocationNfsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeLocationNfs API operation for AWS DataSync. +// +// Returns metadata, such as the path information, about a NFS 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 DataSync's +// API operation DescribeLocationNfs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs +func (c *DataSync) DescribeLocationNfs(input *DescribeLocationNfsInput) (*DescribeLocationNfsOutput, error) { + req, out := c.DescribeLocationNfsRequest(input) + return out, req.Send() +} + +// DescribeLocationNfsWithContext is the same as DescribeLocationNfs with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeLocationNfs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DescribeLocationNfsWithContext(ctx aws.Context, input *DescribeLocationNfsInput, opts ...request.Option) (*DescribeLocationNfsOutput, error) { + req, out := c.DescribeLocationNfsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeLocationS3 = "DescribeLocationS3" + +// DescribeLocationS3Request generates a "aws/request.Request" representing the +// client's request for the DescribeLocationS3 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeLocationS3 for more information on using the DescribeLocationS3 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeLocationS3Request method. +// req, resp := client.DescribeLocationS3Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3 +func (c *DataSync) DescribeLocationS3Request(input *DescribeLocationS3Input) (req *request.Request, output *DescribeLocationS3Output) { + op := &request.Operation{ + Name: opDescribeLocationS3, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeLocationS3Input{} + } + + output = &DescribeLocationS3Output{} + req = c.newRequest(op, input, output) + return +} + +// DescribeLocationS3 API operation for AWS DataSync. +// +// Returns metadata, such as bucket name, about an Amazon S3 bucket 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 DataSync's +// API operation DescribeLocationS3 for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3 +func (c *DataSync) DescribeLocationS3(input *DescribeLocationS3Input) (*DescribeLocationS3Output, error) { + req, out := c.DescribeLocationS3Request(input) + return out, req.Send() +} + +// DescribeLocationS3WithContext is the same as DescribeLocationS3 with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeLocationS3 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DescribeLocationS3WithContext(ctx aws.Context, input *DescribeLocationS3Input, opts ...request.Option) (*DescribeLocationS3Output, error) { + req, out := c.DescribeLocationS3Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTask = "DescribeTask" + +// DescribeTaskRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTask for more information on using the DescribeTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTaskRequest method. +// req, resp := client.DescribeTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask +func (c *DataSync) DescribeTaskRequest(input *DescribeTaskInput) (req *request.Request, output *DescribeTaskOutput) { + op := &request.Operation{ + Name: opDescribeTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTaskInput{} + } + + output = &DescribeTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTask API operation for AWS DataSync. +// +// Returns metadata about a task. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation DescribeTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask +func (c *DataSync) DescribeTask(input *DescribeTaskInput) (*DescribeTaskOutput, error) { + req, out := c.DescribeTaskRequest(input) + return out, req.Send() +} + +// DescribeTaskWithContext is the same as DescribeTask with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DescribeTaskWithContext(ctx aws.Context, input *DescribeTaskInput, opts ...request.Option) (*DescribeTaskOutput, error) { + req, out := c.DescribeTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTaskExecution = "DescribeTaskExecution" + +// DescribeTaskExecutionRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTaskExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTaskExecution for more information on using the DescribeTaskExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTaskExecutionRequest method. +// req, resp := client.DescribeTaskExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution +func (c *DataSync) DescribeTaskExecutionRequest(input *DescribeTaskExecutionInput) (req *request.Request, output *DescribeTaskExecutionOutput) { + op := &request.Operation{ + Name: opDescribeTaskExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTaskExecutionInput{} + } + + output = &DescribeTaskExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTaskExecution API operation for AWS DataSync. +// +// Returns detailed metadata about a task that is being executed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation DescribeTaskExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution +func (c *DataSync) DescribeTaskExecution(input *DescribeTaskExecutionInput) (*DescribeTaskExecutionOutput, error) { + req, out := c.DescribeTaskExecutionRequest(input) + return out, req.Send() +} + +// DescribeTaskExecutionWithContext is the same as DescribeTaskExecution with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTaskExecution for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) DescribeTaskExecutionWithContext(ctx aws.Context, input *DescribeTaskExecutionInput, opts ...request.Option) (*DescribeTaskExecutionOutput, error) { + req, out := c.DescribeTaskExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListAgents = "ListAgents" + +// ListAgentsRequest generates a "aws/request.Request" representing the +// client's request for the ListAgents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListAgents for more information on using the ListAgents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListAgentsRequest method. +// req, resp := client.ListAgentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents +func (c *DataSync) ListAgentsRequest(input *ListAgentsInput) (req *request.Request, output *ListAgentsOutput) { + op := &request.Operation{ + Name: opListAgents, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListAgentsInput{} + } + + output = &ListAgentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAgents API operation for AWS DataSync. +// +// Returns a list of agents owned by an AWS account in the AWS Region specified +// in the request. The returned list is ordered by agent Amazon Resource Name +// (ARN). +// +// By default, this operation returns a maximum of 100 agents. This operation +// supports pagination that enables you to optionally reduce the number of agents +// returned in a response. +// +// If you have more agents than are returned in a response (that is, the response +// returns only a truncated list of your agents), the response contains a marker +// that you can specify in your next request to fetch the next page of agents. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation ListAgents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents +func (c *DataSync) ListAgents(input *ListAgentsInput) (*ListAgentsOutput, error) { + req, out := c.ListAgentsRequest(input) + return out, req.Send() +} + +// ListAgentsWithContext is the same as ListAgents with the addition of +// the ability to pass a context and additional request options. +// +// See ListAgents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) ListAgentsWithContext(ctx aws.Context, input *ListAgentsInput, opts ...request.Option) (*ListAgentsOutput, error) { + req, out := c.ListAgentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListAgentsPages iterates over the pages of a ListAgents operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListAgents 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 ListAgents operation. +// pageNum := 0 +// err := client.ListAgentsPages(params, +// func(page *ListAgentsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DataSync) ListAgentsPages(input *ListAgentsInput, fn func(*ListAgentsOutput, bool) bool) error { + return c.ListAgentsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListAgentsPagesWithContext same as ListAgentsPages 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 *DataSync) ListAgentsPagesWithContext(ctx aws.Context, input *ListAgentsInput, fn func(*ListAgentsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListAgentsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListAgentsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListAgentsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListLocations = "ListLocations" + +// ListLocationsRequest generates a "aws/request.Request" representing the +// client's request for the ListLocations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLocations for more information on using the ListLocations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLocationsRequest method. +// req, resp := client.ListLocationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations +func (c *DataSync) ListLocationsRequest(input *ListLocationsInput) (req *request.Request, output *ListLocationsOutput) { + op := &request.Operation{ + Name: opListLocations, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListLocationsInput{} + } + + output = &ListLocationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLocations API operation for AWS DataSync. +// +// Returns a lists of source and destination locations. +// +// If you have more locations than are returned in a response (that is, the +// response returns only a truncated list of your agents), the response contains +// a token that you can specify in your next request to fetch the next page +// of locations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation ListLocations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations +func (c *DataSync) ListLocations(input *ListLocationsInput) (*ListLocationsOutput, error) { + req, out := c.ListLocationsRequest(input) + return out, req.Send() +} + +// ListLocationsWithContext is the same as ListLocations with the addition of +// the ability to pass a context and additional request options. +// +// See ListLocations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) ListLocationsWithContext(ctx aws.Context, input *ListLocationsInput, opts ...request.Option) (*ListLocationsOutput, error) { + req, out := c.ListLocationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListLocationsPages iterates over the pages of a ListLocations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListLocations 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 ListLocations operation. +// pageNum := 0 +// err := client.ListLocationsPages(params, +// func(page *ListLocationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DataSync) ListLocationsPages(input *ListLocationsInput, fn func(*ListLocationsOutput, bool) bool) error { + return c.ListLocationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListLocationsPagesWithContext same as ListLocationsPages 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 *DataSync) ListLocationsPagesWithContext(ctx aws.Context, input *ListLocationsInput, fn func(*ListLocationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListLocationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListLocationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListLocationsOutput), !p.HasNextPage()) + } + 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/datasync-2018-11-09/ListTagsForResource +func (c *DataSync) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS DataSync. +// +// Returns all the tags associated with a specified 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 DataSync's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTagsForResource +func (c *DataSync) 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 *DataSync) 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() +} + +// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTagsForResource 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 ListTagsForResource operation. +// pageNum := 0 +// err := client.ListTagsForResourcePages(params, +// func(page *ListTagsForResourceOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DataSync) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error { + return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages 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 *DataSync) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTagsForResourceInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTagsForResourceRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTaskExecutions = "ListTaskExecutions" + +// ListTaskExecutionsRequest generates a "aws/request.Request" representing the +// client's request for the ListTaskExecutions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTaskExecutions for more information on using the ListTaskExecutions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTaskExecutionsRequest method. +// req, resp := client.ListTaskExecutionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions +func (c *DataSync) ListTaskExecutionsRequest(input *ListTaskExecutionsInput) (req *request.Request, output *ListTaskExecutionsOutput) { + op := &request.Operation{ + Name: opListTaskExecutions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTaskExecutionsInput{} + } + + output = &ListTaskExecutionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTaskExecutions API operation for AWS DataSync. +// +// Returns a list of executed tasks. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation ListTaskExecutions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions +func (c *DataSync) ListTaskExecutions(input *ListTaskExecutionsInput) (*ListTaskExecutionsOutput, error) { + req, out := c.ListTaskExecutionsRequest(input) + return out, req.Send() +} + +// ListTaskExecutionsWithContext is the same as ListTaskExecutions with the addition of +// the ability to pass a context and additional request options. +// +// See ListTaskExecutions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) ListTaskExecutionsWithContext(ctx aws.Context, input *ListTaskExecutionsInput, opts ...request.Option) (*ListTaskExecutionsOutput, error) { + req, out := c.ListTaskExecutionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTaskExecutionsPages iterates over the pages of a ListTaskExecutions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTaskExecutions 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 ListTaskExecutions operation. +// pageNum := 0 +// err := client.ListTaskExecutionsPages(params, +// func(page *ListTaskExecutionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DataSync) ListTaskExecutionsPages(input *ListTaskExecutionsInput, fn func(*ListTaskExecutionsOutput, bool) bool) error { + return c.ListTaskExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTaskExecutionsPagesWithContext same as ListTaskExecutionsPages 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 *DataSync) ListTaskExecutionsPagesWithContext(ctx aws.Context, input *ListTaskExecutionsInput, fn func(*ListTaskExecutionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTaskExecutionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTaskExecutionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTaskExecutionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTasks for more information on using the ListTasks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTasksRequest method. +// req, resp := client.ListTasksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks +func (c *DataSync) ListTasksRequest(input *ListTasksInput) (req *request.Request, output *ListTasksOutput) { + op := &request.Operation{ + Name: opListTasks, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTasksInput{} + } + + output = &ListTasksOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTasks API operation for AWS DataSync. +// +// Returns a list of all the tasks. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation ListTasks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks +func (c *DataSync) ListTasks(input *ListTasksInput) (*ListTasksOutput, error) { + req, out := c.ListTasksRequest(input) + return out, req.Send() +} + +// ListTasksWithContext is the same as ListTasks with the addition of +// the ability to pass a context and additional request options. +// +// See ListTasks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) ListTasksWithContext(ctx aws.Context, input *ListTasksInput, opts ...request.Option) (*ListTasksOutput, error) { + req, out := c.ListTasksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTasksPages iterates over the pages of a ListTasks operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTasks 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 ListTasks operation. +// pageNum := 0 +// err := client.ListTasksPages(params, +// func(page *ListTasksOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DataSync) ListTasksPages(input *ListTasksInput, fn func(*ListTasksOutput, bool) bool) error { + return c.ListTasksPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTasksPagesWithContext same as ListTasksPages 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 *DataSync) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, fn func(*ListTasksOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTasksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTasksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTasksOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opStartTaskExecution = "StartTaskExecution" + +// StartTaskExecutionRequest generates a "aws/request.Request" representing the +// client's request for the StartTaskExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartTaskExecution for more information on using the StartTaskExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartTaskExecutionRequest method. +// req, resp := client.StartTaskExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution +func (c *DataSync) StartTaskExecutionRequest(input *StartTaskExecutionInput) (req *request.Request, output *StartTaskExecutionOutput) { + op := &request.Operation{ + Name: opStartTaskExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartTaskExecutionInput{} + } + + output = &StartTaskExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartTaskExecution API operation for AWS DataSync. +// +// Starts a specific invocation of a task. A TaskExecution value represents +// an individual run of a task. Each task can have at most one TaskExecution +// at a time. +// +// TaskExecution has the following transition phases: INITIALIZING | PREPARING +// | TRANSFERRING | VERIFYING | SUCCESS/FAILURE. +// +// For detailed information, see Task Execution in Components and Terminology +// (https://docs.aws.amazon.com/sync-service/latest/userguide/how-awssync-works.html#terminology) +// in the AWS DataSync 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 DataSync's +// API operation StartTaskExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution +func (c *DataSync) StartTaskExecution(input *StartTaskExecutionInput) (*StartTaskExecutionOutput, error) { + req, out := c.StartTaskExecutionRequest(input) + return out, req.Send() +} + +// StartTaskExecutionWithContext is the same as StartTaskExecution with the addition of +// the ability to pass a context and additional request options. +// +// See StartTaskExecution for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) StartTaskExecutionWithContext(ctx aws.Context, input *StartTaskExecutionInput, opts ...request.Option) (*StartTaskExecutionOutput, error) { + req, out := c.StartTaskExecutionRequest(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/datasync-2018-11-09/TagResource +func (c *DataSync) 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 DataSync. +// +// Applies a key-value pair to an AWS 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 DataSync's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/TagResource +func (c *DataSync) 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 *DataSync) 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/datasync-2018-11-09/UntagResource +func (c *DataSync) 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 DataSync. +// +// Removes a tag from an AWS 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 DataSync's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UntagResource +func (c *DataSync) 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 *DataSync) 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 opUpdateAgent = "UpdateAgent" + +// UpdateAgentRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAgent operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAgent for more information on using the UpdateAgent +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAgentRequest method. +// req, resp := client.UpdateAgentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent +func (c *DataSync) UpdateAgentRequest(input *UpdateAgentInput) (req *request.Request, output *UpdateAgentOutput) { + op := &request.Operation{ + Name: opUpdateAgent, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateAgentInput{} + } + + output = &UpdateAgentOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateAgent API operation for AWS DataSync. +// +// Updates the name of an agent. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation UpdateAgent for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent +func (c *DataSync) UpdateAgent(input *UpdateAgentInput) (*UpdateAgentOutput, error) { + req, out := c.UpdateAgentRequest(input) + return out, req.Send() +} + +// UpdateAgentWithContext is the same as UpdateAgent with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAgent for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) UpdateAgentWithContext(ctx aws.Context, input *UpdateAgentInput, opts ...request.Option) (*UpdateAgentOutput, error) { + req, out := c.UpdateAgentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateTask = "UpdateTask" + +// UpdateTaskRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTask for more information on using the UpdateTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTaskRequest method. +// req, resp := client.UpdateTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask +func (c *DataSync) UpdateTaskRequest(input *UpdateTaskInput) (req *request.Request, output *UpdateTaskOutput) { + op := &request.Operation{ + Name: opUpdateTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTaskInput{} + } + + output = &UpdateTaskOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateTask API operation for AWS DataSync. +// +// Updates the metadata associated with a task. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 DataSync's +// API operation UpdateTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask +func (c *DataSync) UpdateTask(input *UpdateTaskInput) (*UpdateTaskOutput, error) { + req, out := c.UpdateTaskRequest(input) + return out, req.Send() +} + +// UpdateTaskWithContext is the same as UpdateTask with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataSync) UpdateTaskWithContext(ctx aws.Context, input *UpdateTaskInput, opts ...request.Option) (*UpdateTaskOutput, error) { + req, out := c.UpdateTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Represents a single entry in a list of agents. AgentListEntry returns an +// array that contains a list of agents when the ListAgents operation is called. +type AgentListEntry struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the agent. + AgentArn *string `type:"string"` + + // The name of the agent. + Name *string `min:"1" type:"string"` + + // The status of the agent. + Status *string `type:"string" enum:"AgentStatus"` +} + +// String returns the string representation +func (s AgentListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AgentListEntry) GoString() string { + return s.String() +} + +// SetAgentArn sets the AgentArn field's value. +func (s *AgentListEntry) SetAgentArn(v string) *AgentListEntry { + s.AgentArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *AgentListEntry) SetName(v string) *AgentListEntry { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AgentListEntry) SetStatus(v string) *AgentListEntry { + s.Status = &v + return s +} + +// CancelTaskExecutionRequest +type CancelTaskExecutionInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the task execution to cancel. + // + // TaskExecutionArn is a required field + TaskExecutionArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelTaskExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelTaskExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelTaskExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelTaskExecutionInput"} + if s.TaskExecutionArn == nil { + invalidParams.Add(request.NewErrParamRequired("TaskExecutionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTaskExecutionArn sets the TaskExecutionArn field's value. +func (s *CancelTaskExecutionInput) SetTaskExecutionArn(v string) *CancelTaskExecutionInput { + s.TaskExecutionArn = &v + return s +} + +type CancelTaskExecutionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CancelTaskExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelTaskExecutionOutput) GoString() string { + return s.String() +} + +// CreateAgentRequest +type CreateAgentInput struct { + _ struct{} `type:"structure"` + + // Your agent activation key. You can get the activation key either by sending + // an HTTP GET request with redirects that enable you to get the agent IP address + // (port 80). Alternatively, you can get it from the AWS DataSync console. + // + // The redirect URL returned in the response provides you the activation key + // for your agent in the query string parameter activationKey. It might also + // include other activation-related parameters; however, these are merely defaults. + // The arguments you pass to this API call determine the actual configuration + // of your agent. For more information, see Activating a Sync Agent (https://docs.aws.amazon.com/sync-service/latest/userguide/working-with-sync-agents.html#activating-sync-agent) + // in the AWS DataSync User Guide. + // + // ActivationKey is a required field + ActivationKey *string `type:"string" required:"true"` + + // The name you configured for your agent. This value is a text reference that + // is used to identify the agent in the console. + AgentName *string `min:"1" type:"string"` + + // The key-value pair that represents the tag you want to associate with the + // agent. The value can be an empty string. This value helps you manage, filter, + // and search for your agents. + // + // Valid characters for key and value are letters, spaces, and numbers representable + // in UTF-8 format, and the following special characters: + - = . _ : / @. + Tags []*TagListEntry `type:"list"` +} + +// String returns the string representation +func (s CreateAgentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAgentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAgentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAgentInput"} + if s.ActivationKey == nil { + invalidParams.Add(request.NewErrParamRequired("ActivationKey")) + } + if s.AgentName != nil && len(*s.AgentName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AgentName", 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 +} + +// SetActivationKey sets the ActivationKey field's value. +func (s *CreateAgentInput) SetActivationKey(v string) *CreateAgentInput { + s.ActivationKey = &v + return s +} + +// SetAgentName sets the AgentName field's value. +func (s *CreateAgentInput) SetAgentName(v string) *CreateAgentInput { + s.AgentName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateAgentInput) SetTags(v []*TagListEntry) *CreateAgentInput { + s.Tags = v + return s +} + +// CreateAgentResponse +type CreateAgentOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the agent. Use the ListAgents operation + // to return a list of agents for your account and AWS Region. + AgentArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateAgentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAgentOutput) GoString() string { + return s.String() +} + +// SetAgentArn sets the AgentArn field's value. +func (s *CreateAgentOutput) SetAgentArn(v string) *CreateAgentOutput { + s.AgentArn = &v + return s +} + +// CreateLocationEfsRequest +type CreateLocationEfsInput struct { + _ struct{} `type:"structure"` + + // The subnet and security group that the Amazon EFS file system uses. + // + // Ec2Config is a required field + Ec2Config *Ec2Config `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) for the Amazon EFS file system. + // + // EfsFilesystemArn is a required field + EfsFilesystemArn *string `type:"string" required:"true"` + + // A subdirectory in the location’s path. This subdirectory in the EFS file + // system is used to read data from the EFS source location or write data to + // the EFS destination. By default, AWS DataSync uses the root directory. + // + // Subdirectory is a required field + Subdirectory *string `type:"string" required:"true"` + + // The key-value pair that represents a tag that you want to add to the resource. + // The value can be an empty string. This value helps you manage, filter, and + // search for your resources. We recommend that you create a name tag for your + // location. + Tags []*TagListEntry `type:"list"` +} + +// String returns the string representation +func (s CreateLocationEfsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLocationEfsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLocationEfsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLocationEfsInput"} + if s.Ec2Config == nil { + invalidParams.Add(request.NewErrParamRequired("Ec2Config")) + } + if s.EfsFilesystemArn == nil { + invalidParams.Add(request.NewErrParamRequired("EfsFilesystemArn")) + } + if s.Subdirectory == nil { + invalidParams.Add(request.NewErrParamRequired("Subdirectory")) + } + if s.Ec2Config != nil { + if err := s.Ec2Config.Validate(); err != nil { + invalidParams.AddNested("Ec2Config", 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 + } + return nil +} + +// SetEc2Config sets the Ec2Config field's value. +func (s *CreateLocationEfsInput) SetEc2Config(v *Ec2Config) *CreateLocationEfsInput { + s.Ec2Config = v + return s +} + +// SetEfsFilesystemArn sets the EfsFilesystemArn field's value. +func (s *CreateLocationEfsInput) SetEfsFilesystemArn(v string) *CreateLocationEfsInput { + s.EfsFilesystemArn = &v + return s +} + +// SetSubdirectory sets the Subdirectory field's value. +func (s *CreateLocationEfsInput) SetSubdirectory(v string) *CreateLocationEfsInput { + s.Subdirectory = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLocationEfsInput) SetTags(v []*TagListEntry) *CreateLocationEfsInput { + s.Tags = v + return s +} + +// CreateLocationEfs +type CreateLocationEfsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon EFS file system location that + // is created. + LocationArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateLocationEfsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLocationEfsOutput) GoString() string { + return s.String() +} + +// SetLocationArn sets the LocationArn field's value. +func (s *CreateLocationEfsOutput) SetLocationArn(v string) *CreateLocationEfsOutput { + s.LocationArn = &v + return s +} + +// CreateLocationNfsRequest +type CreateLocationNfsInput struct { + _ struct{} `type:"structure"` + + // Contains a list of Amazon Resource Names (ARNs) of agents that are used to + // connect to an NFS server. + // + // OnPremConfig is a required field + OnPremConfig *OnPremConfig `type:"structure" required:"true"` + + // The name of the NFS server. This value is the IP address or Domain Name Service + // (DNS) name of the NFS server. An agent that is installed on-premises uses + // this host name to mount the NFS server in a network. + // + // This name must either be DNS-compliant or must be an IP version 4 (IPv4) + // address. + // + // ServerHostname is a required field + ServerHostname *string `type:"string" required:"true"` + + // The subdirectory in the NFS file system that is used to read data from the + // NFS source location or write data to the NFS destination. The NFS path should + // be a path that's exported by the NFS server, or a subdirectory of that path. + // The path should be such that it can be mounted by other NFS clients in your + // network. + // + // To see all the paths exported by your NFS server. run "showmount -e nfs-server-name" + // from an NFS client that has access to your server. You can specify any directory + // that appears in the results, and any subdirectory of that directory. Ensure + // that the NFS export is accessible without Kerberos authentication. + // + // To transfer all the data in the folder you specified, DataSync needs to have + // permissions to read all the data. To ensure this, either configure the NFS + // export with no_root_squash, or ensure that the permissions for all of the + // files that you want sync allow read access for all users. Doing either enables + // the agent to read the files. For the agent to access directories, you must + // additionally enable all execute access. For information about NFS export + // configuration, see 18.7. The /etc/exports Configuration File (https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-server-config-exports.html) + // in the Centos documentation. + // + // Subdirectory is a required field + Subdirectory *string `type:"string" required:"true"` + + // The key-value pair that represents the tag that you want to add to the location. + // The value can be an empty string. We recommend using tags to name your resources. + Tags []*TagListEntry `type:"list"` +} + +// String returns the string representation +func (s CreateLocationNfsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLocationNfsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLocationNfsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLocationNfsInput"} + if s.OnPremConfig == nil { + invalidParams.Add(request.NewErrParamRequired("OnPremConfig")) + } + if s.ServerHostname == nil { + invalidParams.Add(request.NewErrParamRequired("ServerHostname")) + } + if s.Subdirectory == nil { + invalidParams.Add(request.NewErrParamRequired("Subdirectory")) + } + if s.OnPremConfig != nil { + if err := s.OnPremConfig.Validate(); err != nil { + invalidParams.AddNested("OnPremConfig", 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 + } + return nil +} + +// SetOnPremConfig sets the OnPremConfig field's value. +func (s *CreateLocationNfsInput) SetOnPremConfig(v *OnPremConfig) *CreateLocationNfsInput { + s.OnPremConfig = v + return s +} + +// SetServerHostname sets the ServerHostname field's value. +func (s *CreateLocationNfsInput) SetServerHostname(v string) *CreateLocationNfsInput { + s.ServerHostname = &v + return s +} + +// SetSubdirectory sets the Subdirectory field's value. +func (s *CreateLocationNfsInput) SetSubdirectory(v string) *CreateLocationNfsInput { + s.Subdirectory = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLocationNfsInput) SetTags(v []*TagListEntry) *CreateLocationNfsInput { + s.Tags = v + return s +} + +// CreateLocationNfsResponse +type CreateLocationNfsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the source NFS file system location that + // is created. + LocationArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateLocationNfsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLocationNfsOutput) GoString() string { + return s.String() +} + +// SetLocationArn sets the LocationArn field's value. +func (s *CreateLocationNfsOutput) SetLocationArn(v string) *CreateLocationNfsOutput { + s.LocationArn = &v + return s +} + +// CreateLocationS3Request +type CreateLocationS3Input struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon S3 bucket. + // + // S3BucketArn is a required field + S3BucketArn *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the AWS Identity and Access Management + // (IAM) role that is used to access an Amazon S3 bucket. For detailed information + // about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli) + // in the AWS DataSync User Guide. + // + // S3Config is a required field + S3Config *S3Config `type:"structure" required:"true"` + + // A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is + // used to read data from the S3 source location or write data to the S3 destination. + // + // Subdirectory is a required field + Subdirectory *string `type:"string" required:"true"` + + // The key-value pair that represents the tag that you want to add to the location. + // The value can be an empty string. We recommend using tags to name your resources. + Tags []*TagListEntry `type:"list"` +} + +// String returns the string representation +func (s CreateLocationS3Input) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLocationS3Input) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLocationS3Input) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLocationS3Input"} + if s.S3BucketArn == nil { + invalidParams.Add(request.NewErrParamRequired("S3BucketArn")) + } + if s.S3Config == nil { + invalidParams.Add(request.NewErrParamRequired("S3Config")) + } + if s.Subdirectory == nil { + invalidParams.Add(request.NewErrParamRequired("Subdirectory")) + } + if s.S3Config != nil { + if err := s.S3Config.Validate(); err != nil { + invalidParams.AddNested("S3Config", 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 + } + return nil +} + +// SetS3BucketArn sets the S3BucketArn field's value. +func (s *CreateLocationS3Input) SetS3BucketArn(v string) *CreateLocationS3Input { + s.S3BucketArn = &v + return s +} + +// SetS3Config sets the S3Config field's value. +func (s *CreateLocationS3Input) SetS3Config(v *S3Config) *CreateLocationS3Input { + s.S3Config = v + return s +} + +// SetSubdirectory sets the Subdirectory field's value. +func (s *CreateLocationS3Input) SetSubdirectory(v string) *CreateLocationS3Input { + s.Subdirectory = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLocationS3Input) SetTags(v []*TagListEntry) *CreateLocationS3Input { + s.Tags = v + return s +} + +// CreateLocationS3Response +type CreateLocationS3Output struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that + // is created. + LocationArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateLocationS3Output) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLocationS3Output) GoString() string { + return s.String() +} + +// SetLocationArn sets the LocationArn field's value. +func (s *CreateLocationS3Output) SetLocationArn(v string) *CreateLocationS3Output { + s.LocationArn = &v + return s +} + +// CreateTaskRequest +type CreateTaskInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is + // used to monitor and log events in the task. For more information on these + // groups, see Working with Log Groups and Log Streams (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) + // in the Amazon CloudWatch User Guide. + // + // For more information about how to useCloudWatchLogs with DataSync, see Monitoring + // Your Task (https://docs.aws.amazon.com/datasync/latest/userguide/monitor-datasync.html). + CloudWatchLogGroupArn *string `type:"string"` + + // The Amazon Resource Name (ARN) of an AWS storage resource's location. + // + // DestinationLocationArn is a required field + DestinationLocationArn *string `type:"string" required:"true"` + + // The name of a task. This value is a text reference that is used to identify + // the task in the console. + Name *string `min:"1" type:"string"` + + // The set of configuration options that control the behavior of a single execution + // of the task that occurs when you call StartTaskExecution. You can configure + // these options to preserve metadata such as user ID (UID) and group ID (GID), + // file permissions, data integrity verification, and so on. + // + // For each individual task execution, you can override these options by specifying + // the OverrideOptions before starting a the task execution. For more information, + // see the operation. + Options *Options `type:"structure"` + + // The Amazon Resource Name (ARN) of the source location for the task. + // + // SourceLocationArn is a required field + SourceLocationArn *string `type:"string" required:"true"` + + // The key-value pair that represents the tag that you want to add to the resource. + // The value can be an empty string. + Tags []*TagListEntry `type:"list"` +} + +// String returns the string representation +func (s CreateTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTaskInput"} + if s.DestinationLocationArn == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationLocationArn")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.SourceLocationArn == nil { + invalidParams.Add(request.NewErrParamRequired("SourceLocationArn")) + } + if s.Options != nil { + if err := s.Options.Validate(); err != nil { + invalidParams.AddNested("Options", 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 + } + return nil +} + +// SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. +func (s *CreateTaskInput) SetCloudWatchLogGroupArn(v string) *CreateTaskInput { + s.CloudWatchLogGroupArn = &v + return s +} + +// SetDestinationLocationArn sets the DestinationLocationArn field's value. +func (s *CreateTaskInput) SetDestinationLocationArn(v string) *CreateTaskInput { + s.DestinationLocationArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateTaskInput) SetName(v string) *CreateTaskInput { + s.Name = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *CreateTaskInput) SetOptions(v *Options) *CreateTaskInput { + s.Options = v + return s +} + +// SetSourceLocationArn sets the SourceLocationArn field's value. +func (s *CreateTaskInput) SetSourceLocationArn(v string) *CreateTaskInput { + s.SourceLocationArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateTaskInput) SetTags(v []*TagListEntry) *CreateTaskInput { + s.Tags = v + return s +} + +// CreateTaskResponse +type CreateTaskOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the task. + TaskArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTaskOutput) GoString() string { + return s.String() +} + +// SetTaskArn sets the TaskArn field's value. +func (s *CreateTaskOutput) SetTaskArn(v string) *CreateTaskOutput { + s.TaskArn = &v + return s +} + +// DeleteAgentRequest +type DeleteAgentInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the agent to delete. Use the ListAgents + // operation to return a list of agents for your account and AWS Region. + // + // AgentArn is a required field + AgentArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAgentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAgentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAgentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAgentInput"} + if s.AgentArn == nil { + invalidParams.Add(request.NewErrParamRequired("AgentArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAgentArn sets the AgentArn field's value. +func (s *DeleteAgentInput) SetAgentArn(v string) *DeleteAgentInput { + s.AgentArn = &v + return s +} + +type DeleteAgentOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteAgentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAgentOutput) GoString() string { + return s.String() +} + +// DeleteLocation +type DeleteLocationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the location to delete. + // + // LocationArn is a required field + LocationArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLocationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLocationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLocationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLocationInput"} + if s.LocationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LocationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLocationArn sets the LocationArn field's value. +func (s *DeleteLocationInput) SetLocationArn(v string) *DeleteLocationInput { + s.LocationArn = &v + return s +} + +type DeleteLocationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteLocationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLocationOutput) GoString() string { + return s.String() +} + +// DeleteTask +type DeleteTaskInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the task to delete. + // + // TaskArn is a required field + TaskArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTaskInput"} + if s.TaskArn == nil { + invalidParams.Add(request.NewErrParamRequired("TaskArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTaskArn sets the TaskArn field's value. +func (s *DeleteTaskInput) SetTaskArn(v string) *DeleteTaskInput { + s.TaskArn = &v + return s +} + +type DeleteTaskOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTaskOutput) GoString() string { + return s.String() +} + +// DescribeAgent +type DescribeAgentInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the agent to describe. + // + // AgentArn is a required field + AgentArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeAgentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAgentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAgentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAgentInput"} + if s.AgentArn == nil { + invalidParams.Add(request.NewErrParamRequired("AgentArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAgentArn sets the AgentArn field's value. +func (s *DescribeAgentInput) SetAgentArn(v string) *DescribeAgentInput { + s.AgentArn = &v + return s +} + +// DescribeAgentResponse +type DescribeAgentOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the agent. + AgentArn *string `type:"string"` + + // The time that the agent was activated (that is, created in your account). + CreationTime *time.Time `type:"timestamp"` + + // The time that the agent was last connected. + LastConnectionTime *time.Time `type:"timestamp"` + + // The name of the agent. + Name *string `min:"1" type:"string"` + + // The status of the agent. If the status is ONLINE, then the agent is configured + // properly and is available to use. The Running status is the normal running + // status for an agent. If the status is OFFLINE, the agent's VM is turned off + // or the agent is in an unhealthy state. When the issue that caused the unhealthy + // state is resolved, the agent returns to ONLINE status. + Status *string `type:"string" enum:"AgentStatus"` +} + +// String returns the string representation +func (s DescribeAgentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAgentOutput) GoString() string { + return s.String() +} + +// SetAgentArn sets the AgentArn field's value. +func (s *DescribeAgentOutput) SetAgentArn(v string) *DescribeAgentOutput { + s.AgentArn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeAgentOutput) SetCreationTime(v time.Time) *DescribeAgentOutput { + s.CreationTime = &v + return s +} + +// SetLastConnectionTime sets the LastConnectionTime field's value. +func (s *DescribeAgentOutput) SetLastConnectionTime(v time.Time) *DescribeAgentOutput { + s.LastConnectionTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeAgentOutput) SetName(v string) *DescribeAgentOutput { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeAgentOutput) SetStatus(v string) *DescribeAgentOutput { + s.Status = &v + return s +} + +// DescribeLocationEfsRequest +type DescribeLocationEfsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the EFS location to describe. + // + // LocationArn is a required field + LocationArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeLocationEfsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLocationEfsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLocationEfsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLocationEfsInput"} + if s.LocationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LocationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLocationArn sets the LocationArn field's value. +func (s *DescribeLocationEfsInput) SetLocationArn(v string) *DescribeLocationEfsInput { + s.LocationArn = &v + return s +} + +// DescribeLocationEfsResponse +type DescribeLocationEfsOutput struct { + _ struct{} `type:"structure"` + + // The time that the EFS location was created. + CreationTime *time.Time `type:"timestamp"` + + // The subnet and the security group that the target Amazon EFS file system + // uses. The subnet must have at least one mount target for that file system. + // The security group that you provide needs to be able to communicate with + // the security group on the mount target in the subnet specified. + // + // The exact relationship between security group M (of the mount target) and + // security group S (which you provide for DataSync to use at this stage) is + // as follows: + // + // * Security group M (which you associate with the mount target) must allow + // inbound access for the Transmission Control Protocol (TCP) on the NFS + // port (2049) from security group S. You can enable inbound connections + // either by IP address (CIDR range) or security group. + // + // * Security group S (provided to DataSync to access EFS) should have a + // rule that enables outbound connections to the NFS port on one of the file + // system’s mount targets. You can enable outbound connections either by + // IP address (CIDR range) or security group. For information about security + // groups and mount targets, see Security Groups for Amazon EC2 Instances + // and Mount Targets (https://docs.aws.amazon.com/efs/latest/ug/security-considerations.html#network-access) + // in the Amazon EFS User Guide. + Ec2Config *Ec2Config `type:"structure"` + + // The Amazon resource Name (ARN) of the EFS location that was described. + LocationArn *string `type:"string"` + + // The URL of the EFS location that was described. + LocationUri *string `type:"string"` +} + +// String returns the string representation +func (s DescribeLocationEfsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLocationEfsOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeLocationEfsOutput) SetCreationTime(v time.Time) *DescribeLocationEfsOutput { + s.CreationTime = &v + return s +} + +// SetEc2Config sets the Ec2Config field's value. +func (s *DescribeLocationEfsOutput) SetEc2Config(v *Ec2Config) *DescribeLocationEfsOutput { + s.Ec2Config = v + return s +} + +// SetLocationArn sets the LocationArn field's value. +func (s *DescribeLocationEfsOutput) SetLocationArn(v string) *DescribeLocationEfsOutput { + s.LocationArn = &v + return s +} + +// SetLocationUri sets the LocationUri field's value. +func (s *DescribeLocationEfsOutput) SetLocationUri(v string) *DescribeLocationEfsOutput { + s.LocationUri = &v + return s +} + +// DescribeLocationNfsRequest +type DescribeLocationNfsInput struct { + _ struct{} `type:"structure"` + + // The Amazon resource Name (ARN) of the NFS location to describe. + // + // LocationArn is a required field + LocationArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeLocationNfsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLocationNfsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLocationNfsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLocationNfsInput"} + if s.LocationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LocationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLocationArn sets the LocationArn field's value. +func (s *DescribeLocationNfsInput) SetLocationArn(v string) *DescribeLocationNfsInput { + s.LocationArn = &v + return s +} + +// DescribeLocationNfsResponse +type DescribeLocationNfsOutput struct { + _ struct{} `type:"structure"` + + // The time that the NFS location was created. + CreationTime *time.Time `type:"timestamp"` + + // The Amazon resource Name (ARN) of the NFS location that was described. + LocationArn *string `type:"string"` + + // The URL of the source NFS location that was described. + LocationUri *string `type:"string"` + + // A list of Amazon Resource Names (ARNs) of agents to use for a Network File + // System (NFS) location. + OnPremConfig *OnPremConfig `type:"structure"` +} + +// String returns the string representation +func (s DescribeLocationNfsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLocationNfsOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeLocationNfsOutput) SetCreationTime(v time.Time) *DescribeLocationNfsOutput { + s.CreationTime = &v + return s +} + +// SetLocationArn sets the LocationArn field's value. +func (s *DescribeLocationNfsOutput) SetLocationArn(v string) *DescribeLocationNfsOutput { + s.LocationArn = &v + return s +} + +// SetLocationUri sets the LocationUri field's value. +func (s *DescribeLocationNfsOutput) SetLocationUri(v string) *DescribeLocationNfsOutput { + s.LocationUri = &v + return s +} + +// SetOnPremConfig sets the OnPremConfig field's value. +func (s *DescribeLocationNfsOutput) SetOnPremConfig(v *OnPremConfig) *DescribeLocationNfsOutput { + s.OnPremConfig = v + return s +} + +// DescribeLocationS3Request +type DescribeLocationS3Input struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe. + // + // LocationArn is a required field + LocationArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeLocationS3Input) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLocationS3Input) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLocationS3Input) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLocationS3Input"} + if s.LocationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LocationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLocationArn sets the LocationArn field's value. +func (s *DescribeLocationS3Input) SetLocationArn(v string) *DescribeLocationS3Input { + s.LocationArn = &v + return s +} + +// DescribeLocationS3Response +type DescribeLocationS3Output struct { + _ struct{} `type:"structure"` + + // The time that the Amazon S3 bucket location was created. + CreationTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the Amazon S3 bucket location. + LocationArn *string `type:"string"` + + // The URL of the Amazon S3 location that was described. + LocationUri *string `type:"string"` + + // The Amazon Resource Name (ARN) of the AWS Identity and Access Management + // (IAM) role that is used to access an Amazon S3 bucket. For detailed information + // about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli) + // in the AWS DataSync User Guide. + S3Config *S3Config `type:"structure"` +} + +// String returns the string representation +func (s DescribeLocationS3Output) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLocationS3Output) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeLocationS3Output) SetCreationTime(v time.Time) *DescribeLocationS3Output { + s.CreationTime = &v + return s +} + +// SetLocationArn sets the LocationArn field's value. +func (s *DescribeLocationS3Output) SetLocationArn(v string) *DescribeLocationS3Output { + s.LocationArn = &v + return s +} + +// SetLocationUri sets the LocationUri field's value. +func (s *DescribeLocationS3Output) SetLocationUri(v string) *DescribeLocationS3Output { + s.LocationUri = &v + return s +} + +// SetS3Config sets the S3Config field's value. +func (s *DescribeLocationS3Output) SetS3Config(v *S3Config) *DescribeLocationS3Output { + s.S3Config = v + return s +} + +// DescribeTaskExecutionRequest +type DescribeTaskExecutionInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the task that is being executed. + // + // TaskExecutionArn is a required field + TaskExecutionArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTaskExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTaskExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTaskExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTaskExecutionInput"} + if s.TaskExecutionArn == nil { + invalidParams.Add(request.NewErrParamRequired("TaskExecutionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTaskExecutionArn sets the TaskExecutionArn field's value. +func (s *DescribeTaskExecutionInput) SetTaskExecutionArn(v string) *DescribeTaskExecutionInput { + s.TaskExecutionArn = &v + return s +} + +// DescribeTaskExecutionResponse +type DescribeTaskExecutionOutput struct { + _ struct{} `type:"structure"` + + // The physical number of bytes transferred over the network. + BytesTransferred *int64 `type:"long"` + + // The number of logical bytes written to the destination AWS storage resource. + BytesWritten *int64 `type:"long"` + + // The estimated physical number of bytes that is to be transferred over the + // network. + EstimatedBytesToTransfer *int64 `type:"long"` + + // The expected number of files that is to be transferred over the network. + // This value is calculated during the PREPARING phase, before the TRANSFERRING + // phase. This value is the expected number of files to be transferred. It's + // calculated based on comparing the content of the source and destination locations + // and finding the delta that needs to be transferred. + EstimatedFilesToTransfer *int64 `type:"long"` + + // The actual number of files that was transferred over the network. This value + // is calculated and updated on an ongoing basis during the TRANSFERRING phase. + // It's updated periodically when each file is read from the source and sent + // over the network. + // + // If failures occur during a transfer, this value can be less than EstimatedFilesToTransfer. + // This value can also be greater than EstimatedFilesTransferred in some cases. + // This element is implementation-specific for some location types, so don't + // use it as an indicator for a correct file number or to monitor your task + // execution. + FilesTransferred *int64 `type:"long"` + + // Represents the options that are available to control the behavior of a StartTaskExecution + // operation. Behavior includes preserving metadata such as user ID (UID), group + // ID (GID), and file permissions, and also overwriting files in the destination, + // data integrity verification, and so on. + // + // A task has a set of default options associated with it. If you don't specify + // an option in StartTaskExecution, the default value is used. You can override + // the defaults options on each task execution by specifying an overriding Options + // value to StartTaskExecution. + Options *Options `type:"structure"` + + // The result of the task execution. + Result *TaskExecutionResultDetail `type:"structure"` + + // The time that the task execution was started. + StartTime *time.Time `type:"timestamp"` + + // The status of the task. For detailed information about sync statuses, see + // Understanding Sync Task Statuses (https://docs.aws.amazon.com/sync-service/latest/userguide/understand-sync-task-statuses.html). + Status *string `type:"string" enum:"TaskExecutionStatus"` + + // The Amazon Resource Name (ARN) of the task execution that was described. + // TaskExecutionArn is hierarchical and includes TaskArn for the task that was + // executed. + // + // For example, a TaskExecution value with the ARN arn:aws:sync:us-east-1:209870788375:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b + // executed the task with the ARN arn:aws:sync:us-east-1:209870788375:task/task-0208075f79cedf4a2. + TaskExecutionArn *string `type:"string"` +} + +// String returns the string representation +func (s DescribeTaskExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTaskExecutionOutput) GoString() string { + return s.String() +} + +// SetBytesTransferred sets the BytesTransferred field's value. +func (s *DescribeTaskExecutionOutput) SetBytesTransferred(v int64) *DescribeTaskExecutionOutput { + s.BytesTransferred = &v + return s +} + +// SetBytesWritten sets the BytesWritten field's value. +func (s *DescribeTaskExecutionOutput) SetBytesWritten(v int64) *DescribeTaskExecutionOutput { + s.BytesWritten = &v + return s +} + +// SetEstimatedBytesToTransfer sets the EstimatedBytesToTransfer field's value. +func (s *DescribeTaskExecutionOutput) SetEstimatedBytesToTransfer(v int64) *DescribeTaskExecutionOutput { + s.EstimatedBytesToTransfer = &v + return s +} + +// SetEstimatedFilesToTransfer sets the EstimatedFilesToTransfer field's value. +func (s *DescribeTaskExecutionOutput) SetEstimatedFilesToTransfer(v int64) *DescribeTaskExecutionOutput { + s.EstimatedFilesToTransfer = &v + return s +} + +// SetFilesTransferred sets the FilesTransferred field's value. +func (s *DescribeTaskExecutionOutput) SetFilesTransferred(v int64) *DescribeTaskExecutionOutput { + s.FilesTransferred = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *DescribeTaskExecutionOutput) SetOptions(v *Options) *DescribeTaskExecutionOutput { + s.Options = v + return s +} + +// SetResult sets the Result field's value. +func (s *DescribeTaskExecutionOutput) SetResult(v *TaskExecutionResultDetail) *DescribeTaskExecutionOutput { + s.Result = v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeTaskExecutionOutput) SetStartTime(v time.Time) *DescribeTaskExecutionOutput { + s.StartTime = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeTaskExecutionOutput) SetStatus(v string) *DescribeTaskExecutionOutput { + s.Status = &v + return s +} + +// SetTaskExecutionArn sets the TaskExecutionArn field's value. +func (s *DescribeTaskExecutionOutput) SetTaskExecutionArn(v string) *DescribeTaskExecutionOutput { + s.TaskExecutionArn = &v + return s +} + +// DescribeTaskRequest +type DescribeTaskInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the task to describe. + // + // TaskArn is a required field + TaskArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTaskInput"} + if s.TaskArn == nil { + invalidParams.Add(request.NewErrParamRequired("TaskArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTaskArn sets the TaskArn field's value. +func (s *DescribeTaskInput) SetTaskArn(v string) *DescribeTaskInput { + s.TaskArn = &v + return s +} + +// DescribeTaskResponse +type DescribeTaskOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was + // used to monitor and log events in the task. For more information on these + // groups, see Working with Log Groups and Log Streams (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) + // in the Amazon CloudWatch User Guide. + CloudWatchLogGroupArn *string `type:"string"` + + // The time that the task was created. + CreationTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the task execution that is syncing files. + CurrentTaskExecutionArn *string `type:"string"` + + // The Amazon Resource Name (ARN) of the AWS storage resource's location. + DestinationLocationArn *string `type:"string"` + + // Errors that AWS DataSync encountered during execution of the task. You can + // use this error code to help troubleshoot issues. + ErrorCode *string `type:"string"` + + // Detailed description of an error that was encountered during the task execution. + // You can use this information to help troubleshoot issues. + ErrorDetail *string `type:"string"` + + // The name of the task that was described. + Name *string `min:"1" type:"string"` + + // The set of configuration options that control the behavior of a single execution + // of the task that occurs when you call StartTaskExecution. You can configure + // these options to preserve metadata such as user ID (UID) and group (GID), + // file permissions, data integrity verification, and so on. + // + // For each individual task execution, you can override these options by specifying + // the overriding OverrideOptions value to operation. + Options *Options `type:"structure"` + + // The Amazon Resource Name (ARN) of the source file system's location. + SourceLocationArn *string `type:"string"` + + // The status of the task that was described. For detailed information about + // sync statuses, see Understanding Sync Task Statuses (https://docs.aws.amazon.com/sync-service/latest/userguide/understand-sync-task-statuses.html). + Status *string `type:"string" enum:"TaskStatus"` + + // The Amazon Resource Name (ARN) of the task that was described. + TaskArn *string `type:"string"` +} + +// String returns the string representation +func (s DescribeTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTaskOutput) GoString() string { + return s.String() +} + +// SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. +func (s *DescribeTaskOutput) SetCloudWatchLogGroupArn(v string) *DescribeTaskOutput { + s.CloudWatchLogGroupArn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeTaskOutput) SetCreationTime(v time.Time) *DescribeTaskOutput { + s.CreationTime = &v + return s +} + +// SetCurrentTaskExecutionArn sets the CurrentTaskExecutionArn field's value. +func (s *DescribeTaskOutput) SetCurrentTaskExecutionArn(v string) *DescribeTaskOutput { + s.CurrentTaskExecutionArn = &v + return s +} + +// SetDestinationLocationArn sets the DestinationLocationArn field's value. +func (s *DescribeTaskOutput) SetDestinationLocationArn(v string) *DescribeTaskOutput { + s.DestinationLocationArn = &v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *DescribeTaskOutput) SetErrorCode(v string) *DescribeTaskOutput { + s.ErrorCode = &v + return s +} + +// SetErrorDetail sets the ErrorDetail field's value. +func (s *DescribeTaskOutput) SetErrorDetail(v string) *DescribeTaskOutput { + s.ErrorDetail = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeTaskOutput) SetName(v string) *DescribeTaskOutput { + s.Name = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *DescribeTaskOutput) SetOptions(v *Options) *DescribeTaskOutput { + s.Options = v + return s +} + +// SetSourceLocationArn sets the SourceLocationArn field's value. +func (s *DescribeTaskOutput) SetSourceLocationArn(v string) *DescribeTaskOutput { + s.SourceLocationArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeTaskOutput) SetStatus(v string) *DescribeTaskOutput { + s.Status = &v + return s +} + +// SetTaskArn sets the TaskArn field's value. +func (s *DescribeTaskOutput) SetTaskArn(v string) *DescribeTaskOutput { + s.TaskArn = &v + return s +} + +// The subnet and the security group that the target Amazon EFS file system +// uses. The subnet must have at least one mount target for that file system. +// The security group that you provide needs to be able to communicate with +// the security group on the mount target in the subnet specified. +// +// The exact relationship between security group M (of the mount target) and +// security group S (which you provide for DataSync to use at this stage) is +// as follows: +// +// * Security group M (which you associate with the mount target) must allow +// inbound access for the Transmission Control Protocol (TCP) on the NFS +// port (2049) from security group S. You can enable inbound connections +// either by IP address (CIDR range) or security group. +// +// * Security group S (provided to DataSync to access EFS) should have a +// rule that enables outbound connections to the NFS port on one of the file +// system’s mount targets. You can enable outbound connections either by +// IP address (CIDR range) or security group. For information about security +// groups and mount targets, see Security Groups for Amazon EC2 Instances +// and Mount Targets (https://docs.aws.amazon.com/efs/latest/ug/security-considerations.html#network-access) +// in the Amazon EFS User Guide. +type Ec2Config struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Names (ARNs) of the security groups that are configured + // for the Amazon EC2 resource. + // + // SecurityGroupArns is a required field + SecurityGroupArns []*string `min:"1" type:"list" required:"true"` + + // The ARN of the subnet that the Amazon EC2 resource belongs in. + // + // SubnetArn is a required field + SubnetArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Ec2Config) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Ec2Config) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Ec2Config) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Ec2Config"} + if s.SecurityGroupArns == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupArns")) + } + if s.SecurityGroupArns != nil && len(s.SecurityGroupArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityGroupArns", 1)) + } + if s.SubnetArn == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityGroupArns sets the SecurityGroupArns field's value. +func (s *Ec2Config) SetSecurityGroupArns(v []*string) *Ec2Config { + s.SecurityGroupArns = v + return s +} + +// SetSubnetArn sets the SubnetArn field's value. +func (s *Ec2Config) SetSubnetArn(v string) *Ec2Config { + s.SubnetArn = &v + return s +} + +// ListAgentsRequest +type ListAgentsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of agents to list. + MaxResults *int64 `type:"integer"` + + // An opaque string that indicates the position at which to begin the next list + // of agents. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListAgentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAgentsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAgentsInput) SetMaxResults(v int64) *ListAgentsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAgentsInput) SetNextToken(v string) *ListAgentsInput { + s.NextToken = &v + return s +} + +// ListAgentsResponse +type ListAgentsOutput struct { + _ struct{} `type:"structure"` + + // A list of agents in your account. + Agents []*AgentListEntry `type:"list"` + + // An opaque string that indicates the position at which to begin returning + // the next list of agents. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListAgentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAgentsOutput) GoString() string { + return s.String() +} + +// SetAgents sets the Agents field's value. +func (s *ListAgentsOutput) SetAgents(v []*AgentListEntry) *ListAgentsOutput { + s.Agents = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAgentsOutput) SetNextToken(v string) *ListAgentsOutput { + s.NextToken = &v + return s +} + +// ListLocationsRequest +type ListLocationsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of locations to return. + MaxResults *int64 `type:"integer"` + + // An opaque string that indicates the position at which to begin the next list + // of locations. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLocationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLocationsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListLocationsInput) SetMaxResults(v int64) *ListLocationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLocationsInput) SetNextToken(v string) *ListLocationsInput { + s.NextToken = &v + return s +} + +// ListLocationsResponse +type ListLocationsOutput struct { + _ struct{} `type:"structure"` + + // An array that contains a list of locations. + Locations []*LocationListEntry `type:"list"` + + // An opaque string that indicates the position at which to begin returning + // the next list of locations. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLocationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLocationsOutput) GoString() string { + return s.String() +} + +// SetLocations sets the Locations field's value. +func (s *ListLocationsOutput) SetLocations(v []*LocationListEntry) *ListLocationsOutput { + s.Locations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLocationsOutput) SetNextToken(v string) *ListLocationsOutput { + s.NextToken = &v + return s +} + +// ListTagsForResourceRequest +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The maximum number of locations to return. + MaxResults *int64 `type:"integer"` + + // An opaque string that indicates the position at which to begin the next list + // of locations. + NextToken *string `type:"string"` + + // The Amazon Resource Name (ARN) of the resource whose tags to list. + // + // ResourceArn is a required field + ResourceArn *string `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 +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { + s.MaxResults = &v + return s +} + +// 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 +} + +// ListTagsForResourceResponse +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates the position at which to begin returning + // the next list of resource tags. + NextToken *string `type:"string"` + + // Array of resource tags. + Tags []*TagListEntry `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 []*TagListEntry) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// ListTaskExecutions +type ListTaskExecutionsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of executed tasks to list. + MaxResults *int64 `type:"integer"` + + // An opaque string that indicates the position at which to begin the next list + // of the executed tasks. + NextToken *string `type:"string"` + + // The Amazon Resource Name (ARN) of the task whose tasks you want to list. + TaskArn *string `type:"string"` +} + +// String returns the string representation +func (s ListTaskExecutionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTaskExecutionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTaskExecutionsInput) SetMaxResults(v int64) *ListTaskExecutionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTaskExecutionsInput) SetNextToken(v string) *ListTaskExecutionsInput { + s.NextToken = &v + return s +} + +// SetTaskArn sets the TaskArn field's value. +func (s *ListTaskExecutionsInput) SetTaskArn(v string) *ListTaskExecutionsInput { + s.TaskArn = &v + return s +} + +// ListTaskExecutionsResponse +type ListTaskExecutionsOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates the position at which to begin returning + // the next list of executed tasks. + NextToken *string `type:"string"` + + // A list of executed tasks. + TaskExecutions []*TaskExecutionListEntry `type:"list"` +} + +// String returns the string representation +func (s ListTaskExecutionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTaskExecutionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTaskExecutionsOutput) SetNextToken(v string) *ListTaskExecutionsOutput { + s.NextToken = &v + return s +} + +// SetTaskExecutions sets the TaskExecutions field's value. +func (s *ListTaskExecutionsOutput) SetTaskExecutions(v []*TaskExecutionListEntry) *ListTaskExecutionsOutput { + s.TaskExecutions = v + return s +} + +// ListTasksRequest +type ListTasksInput struct { + _ struct{} `type:"structure"` + + // The maximum number of tasks to return. + MaxResults *int64 `type:"integer"` + + // An opaque string that indicates the position at which to begin the next list + // of tasks. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTasksInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTasksInput) SetMaxResults(v int64) *ListTasksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTasksInput) SetNextToken(v string) *ListTasksInput { + s.NextToken = &v + return s +} + +// ListTasksResponse +type ListTasksOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates the position at which to begin returning + // the next list of tasks. + NextToken *string `type:"string"` + + // A list of all the tasks that are returned. + Tasks []*TaskListEntry `type:"list"` +} + +// String returns the string representation +func (s ListTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTasksOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTasksOutput) SetNextToken(v string) *ListTasksOutput { + s.NextToken = &v + return s +} + +// SetTasks sets the Tasks field's value. +func (s *ListTasksOutput) SetTasks(v []*TaskListEntry) *ListTasksOutput { + s.Tasks = v + return s +} + +// Represents a single entry in a list of locations. LocationListEntry returns +// an array that contains a list of locations when the ListLocations operation +// is called. +type LocationListEntry struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the location. For Network File System (NFS) + // or Amazon EFS, the location is the export path. For Amazon S3, the location + // is the prefix path that you want to mount and use as the root of the location. + LocationArn *string `type:"string"` + + // Represents a list of URLs of a location. LocationUri returns an array that + // contains a list of locations when the ListLocations operation is called. + // + // Format: TYPE://GLOBAL_ID/SUBDIR. + // + // TYPE designates the type of location. Valid values: NFS | EFS | S3. + // + // GLOBAL_ID is the globally unique identifier of the resource that backs the + // location. An example for EFS is us-east-2.fs-abcd1234. An example for Amazon + // S3 is the bucket name, such as myBucket. An example for NFS is a valid IPv4 + // address or a host name compliant with Domain Name Service (DNS). + // + // SUBDIR is a valid file system path, delimited by forward slashes as is the + // *nix convention. For NFS and Amazon EFS, it's the export path to mount the + // location. For Amazon S3, it's the prefix path that you mount to and treat + // as the root of the location. + LocationUri *string `type:"string"` +} + +// String returns the string representation +func (s LocationListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LocationListEntry) GoString() string { + return s.String() +} + +// SetLocationArn sets the LocationArn field's value. +func (s *LocationListEntry) SetLocationArn(v string) *LocationListEntry { + s.LocationArn = &v + return s +} + +// SetLocationUri sets the LocationUri field's value. +func (s *LocationListEntry) SetLocationUri(v string) *LocationListEntry { + s.LocationUri = &v + return s +} + +// A list of Amazon Resource Names (ARNs) of agents to use for a Network File +// System (NFS) location. +type OnPremConfig struct { + _ struct{} `type:"structure"` + + // ARNs)of the agents to use for an NFS location. + // + // AgentArns is a required field + AgentArns []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s OnPremConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OnPremConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OnPremConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OnPremConfig"} + if s.AgentArns == nil { + invalidParams.Add(request.NewErrParamRequired("AgentArns")) + } + if s.AgentArns != nil && len(s.AgentArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AgentArns", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAgentArns sets the AgentArns field's value. +func (s *OnPremConfig) SetAgentArns(v []*string) *OnPremConfig { + s.AgentArns = v + return s +} + +// Represents the options that are available to control the behavior of a StartTaskExecution +// operation. Behavior includes preserving metadata such as user ID (UID), group +// ID (GID), and file permissions, and also overwriting files in the destination, +// data integrity verification, and so on. +// +// A task has a set of default options associated with it. If you don't specify +// an option in StartTaskExecution, the default value is used. You can override +// the defaults options on each task execution by specifying an overriding Options +// value to StartTaskExecution. +type Options struct { + _ struct{} `type:"structure"` + + // A file metadata value that shows the last time a file was accessed (that + // is, when the file was read or written to). If you set Atime to BEST_EFFORT, + // DataSync attempts to preserve the original Atime attribute on all source + // files (that is, the version before the PREPARING phase). However, Atime's + // behavior is not fully standard across platforms, so AWS DataSync can only + // do this on a best-effort basis. + // + // Default value: BEST_EFFORT. + // + // BEST_EFFORT: Attempt to preserve the per-file Atime value (recommended). + // + // NONE: Ignore Atime. + // + // If Atime is set to BEST_EFFORT, Mtime must be set to PRESERVE. + // + // If Atime is set to NONE, Mtime must also be NONE. + Atime *string `type:"string" enum:"Atime"` + + // A value that limits the bandwidth used by AWS DataSync. For example, if you + // want AWS DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024). + BytesPerSecond *int64 `type:"long"` + + // The group ID (GID) of the file's owners. + // + // Default value: INT_VALUE. This preserves the integer value of the ID. + // + // INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended). + // + // NONE: Ignore UID and GID. + Gid *string `type:"string" enum:"Gid"` + + // A value that indicates the last time that a file was modified (that is, a + // file was written to) before the PREPARING phase. + // + // Default value: PRESERVE. + // + // PRESERVE: Preserve original Mtime (recommended) + // + // NONE: Ignore Mtime. + // + // If Mtime is set to PRESERVE, Atime must be set to BEST_EFFORT. + // + // If Mtime is set to NONE, Atime must also be set to NONE. + Mtime *string `type:"string" enum:"Mtime"` + + // A value that determines which users or groups can access a file for a specific + // purpose such as reading, writing, or execution of the file. + // + // Default value: PRESERVE. + // + // PRESERVE: Preserve POSIX-style permissions (recommended). + // + // NONE: Ignore permissions. + // + // AWS DataSync can preserve extant permissions of a source location. + PosixPermissions *string `type:"string" enum:"PosixPermissions"` + + // A value that specifies whether files in the destination that don't exist + // in the source file system should be preserved. + // + // Default value: PRESERVE. + // + // PRESERVE: Ignore such destination files (recommended). + // + // REMOVE: Delete destination files that aren’t present in the source. + PreserveDeletedFiles *string `type:"string" enum:"PreserveDeletedFiles"` + + // A value that determines whether AWS DataSync should preserve the metadata + // of block and character devices in the source file system, and recreate the + // files with that device name and metadata on the destination. + // + // AWS DataSync can't sync the actual contents of such devices, because they + // are nonterminal and don't return an end-of-file (EOF) marker. + // + // Default value: NONE. + // + // NONE: Ignore special devices (recommended). + // + // PRESERVE: Preserve character and block device metadata. This option isn't + // currently supported for Amazon EFS. + PreserveDevices *string `type:"string" enum:"PreserveDevices"` + + // The user ID (UID) of the file's owner. + // + // Default value: INT_VALUE. This preserves the integer value of the ID. + // + // INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended). + // + // NONE: Ignore UID and GID. + Uid *string `type:"string" enum:"Uid"` + + // A value that determines whether a data integrity verification should be performed + // at the end of a task execution after all data and metadata have been transferred. + // + // Default value: POINT_IN_TIME_CONSISTENT. + // + // POINT_IN_TIME_CONSISTENT: Perform verification (recommended). + // + // NONE: Skip verification. + VerifyMode *string `type:"string" enum:"VerifyMode"` +} + +// String returns the string representation +func (s Options) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Options) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Options) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Options"} + if s.BytesPerSecond != nil && *s.BytesPerSecond < -1 { + invalidParams.Add(request.NewErrParamMinValue("BytesPerSecond", -1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAtime sets the Atime field's value. +func (s *Options) SetAtime(v string) *Options { + s.Atime = &v + return s +} + +// SetBytesPerSecond sets the BytesPerSecond field's value. +func (s *Options) SetBytesPerSecond(v int64) *Options { + s.BytesPerSecond = &v + return s +} + +// SetGid sets the Gid field's value. +func (s *Options) SetGid(v string) *Options { + s.Gid = &v + return s +} + +// SetMtime sets the Mtime field's value. +func (s *Options) SetMtime(v string) *Options { + s.Mtime = &v + return s +} + +// SetPosixPermissions sets the PosixPermissions field's value. +func (s *Options) SetPosixPermissions(v string) *Options { + s.PosixPermissions = &v + return s +} + +// SetPreserveDeletedFiles sets the PreserveDeletedFiles field's value. +func (s *Options) SetPreserveDeletedFiles(v string) *Options { + s.PreserveDeletedFiles = &v + return s +} + +// SetPreserveDevices sets the PreserveDevices field's value. +func (s *Options) SetPreserveDevices(v string) *Options { + s.PreserveDevices = &v + return s +} + +// SetUid sets the Uid field's value. +func (s *Options) SetUid(v string) *Options { + s.Uid = &v + return s +} + +// SetVerifyMode sets the VerifyMode field's value. +func (s *Options) SetVerifyMode(v string) *Options { + s.VerifyMode = &v + return s +} + +// The Amazon Resource Name (ARN) of the AWS Identity and Access Management +// (IAM) role that is used to access an Amazon S3 bucket. For detailed information +// about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli) +// in the AWS DataSync User Guide. +type S3Config struct { + _ struct{} `type:"structure"` + + // The Amazon S3 bucket to access. This bucket is used as a parameter in the + // CreateLocationS3 operation. + // + // BucketAccessRoleArn is a required field + BucketAccessRoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s S3Config) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Config) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3Config) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3Config"} + if s.BucketAccessRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("BucketAccessRoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketAccessRoleArn sets the BucketAccessRoleArn field's value. +func (s *S3Config) SetBucketAccessRoleArn(v string) *S3Config { + s.BucketAccessRoleArn = &v + return s +} + +// StartTaskExecutionRequest +type StartTaskExecutionInput struct { + _ struct{} `type:"structure"` + + // Represents the options that are available to control the behavior of a StartTaskExecution + // operation. Behavior includes preserving metadata such as user ID (UID), group + // ID (GID), and file permissions, and also overwriting files in the destination, + // data integrity verification, and so on. + // + // A task has a set of default options associated with it. If you don't specify + // an option in StartTaskExecution, the default value is used. You can override + // the defaults options on each task execution by specifying an overriding Options + // value to StartTaskExecution. + OverrideOptions *Options `type:"structure"` + + // The Amazon Resource Name (ARN) of the task to start. + // + // TaskArn is a required field + TaskArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartTaskExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartTaskExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartTaskExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartTaskExecutionInput"} + if s.TaskArn == nil { + invalidParams.Add(request.NewErrParamRequired("TaskArn")) + } + if s.OverrideOptions != nil { + if err := s.OverrideOptions.Validate(); err != nil { + invalidParams.AddNested("OverrideOptions", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOverrideOptions sets the OverrideOptions field's value. +func (s *StartTaskExecutionInput) SetOverrideOptions(v *Options) *StartTaskExecutionInput { + s.OverrideOptions = v + return s +} + +// SetTaskArn sets the TaskArn field's value. +func (s *StartTaskExecutionInput) SetTaskArn(v string) *StartTaskExecutionInput { + s.TaskArn = &v + return s +} + +// StartTaskExecutionResponse +type StartTaskExecutionOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the specific task execution that was started. + TaskExecutionArn *string `type:"string"` +} + +// String returns the string representation +func (s StartTaskExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartTaskExecutionOutput) GoString() string { + return s.String() +} + +// SetTaskExecutionArn sets the TaskExecutionArn field's value. +func (s *StartTaskExecutionOutput) SetTaskExecutionArn(v string) *StartTaskExecutionOutput { + s.TaskExecutionArn = &v + return s +} + +// Represents a single entry in a list of AWS resource tags. TagListEntry returns +// an array that contains a list of tasks when the ListTagsForResource operation +// is called. +type TagListEntry struct { + _ struct{} `type:"structure"` + + // The key for an AWS resource tag. + Key *string `min:"1" type:"string"` + + // The value for an AWS resource tag. + Value *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s TagListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagListEntry) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagListEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagListEntry"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + 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 *TagListEntry) SetKey(v string) *TagListEntry { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *TagListEntry) SetValue(v string) *TagListEntry { + s.Value = &v + return s +} + +// TagResourceRequest +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource to apply the tag to. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // The tags to apply. + // + // Tags is a required field + Tags []*TagListEntry `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 []*TagListEntry) *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() +} + +// Represents a single entry in a list of task executions. TaskExecutionListEntry +// returns an array that contains a list of specific invocations of a task when +// ListTaskExecutions operation is called. +type TaskExecutionListEntry struct { + _ struct{} `type:"structure"` + + // The status of a task execution. + Status *string `type:"string" enum:"TaskExecutionStatus"` + + // The Amazon Resource Name (ARN) of the task that was executed. + TaskExecutionArn *string `type:"string"` +} + +// String returns the string representation +func (s TaskExecutionListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskExecutionListEntry) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *TaskExecutionListEntry) SetStatus(v string) *TaskExecutionListEntry { + s.Status = &v + return s +} + +// SetTaskExecutionArn sets the TaskExecutionArn field's value. +func (s *TaskExecutionListEntry) SetTaskExecutionArn(v string) *TaskExecutionListEntry { + s.TaskExecutionArn = &v + return s +} + +// Describes the detailed result of a TaskExecution operation. This result includes +// the time in milliseconds spent in each phase, the status of the task execution, +// and the errors encountered. +type TaskExecutionResultDetail struct { + _ struct{} `type:"structure"` + + // Errors that AWS DataSync encountered during execution of the task. You can + // use this error code to help troubleshoot issues. + ErrorCode *string `type:"string"` + + // Detailed description of an error that was encountered during the task execution. + // You can use this information to help troubleshoot issues. + ErrorDetail *string `type:"string"` + + // The total time in milliseconds that AWS DataSync spent in the PREPARING phase. + PrepareDuration *int64 `type:"long"` + + // The status of the PREPARING phase. + PrepareStatus *string `type:"string" enum:"PhaseStatus"` + + // The total time in milliseconds that AWS DataSync spent in the TRANSFERRING + // phase. + TransferDuration *int64 `type:"long"` + + // The status of the TRANSFERRING Phase. + TransferStatus *string `type:"string" enum:"PhaseStatus"` + + // The total time in milliseconds that AWS DataSync spent in the VERIFYING phase. + VerifyDuration *int64 `type:"long"` + + // The status of the VERIFYING Phase. + VerifyStatus *string `type:"string" enum:"PhaseStatus"` +} + +// String returns the string representation +func (s TaskExecutionResultDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskExecutionResultDetail) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *TaskExecutionResultDetail) SetErrorCode(v string) *TaskExecutionResultDetail { + s.ErrorCode = &v + return s +} + +// SetErrorDetail sets the ErrorDetail field's value. +func (s *TaskExecutionResultDetail) SetErrorDetail(v string) *TaskExecutionResultDetail { + s.ErrorDetail = &v + return s +} + +// SetPrepareDuration sets the PrepareDuration field's value. +func (s *TaskExecutionResultDetail) SetPrepareDuration(v int64) *TaskExecutionResultDetail { + s.PrepareDuration = &v + return s +} + +// SetPrepareStatus sets the PrepareStatus field's value. +func (s *TaskExecutionResultDetail) SetPrepareStatus(v string) *TaskExecutionResultDetail { + s.PrepareStatus = &v + return s +} + +// SetTransferDuration sets the TransferDuration field's value. +func (s *TaskExecutionResultDetail) SetTransferDuration(v int64) *TaskExecutionResultDetail { + s.TransferDuration = &v + return s +} + +// SetTransferStatus sets the TransferStatus field's value. +func (s *TaskExecutionResultDetail) SetTransferStatus(v string) *TaskExecutionResultDetail { + s.TransferStatus = &v + return s +} + +// SetVerifyDuration sets the VerifyDuration field's value. +func (s *TaskExecutionResultDetail) SetVerifyDuration(v int64) *TaskExecutionResultDetail { + s.VerifyDuration = &v + return s +} + +// SetVerifyStatus sets the VerifyStatus field's value. +func (s *TaskExecutionResultDetail) SetVerifyStatus(v string) *TaskExecutionResultDetail { + s.VerifyStatus = &v + return s +} + +// Represents a single entry in a list of tasks. TaskListEntry returns an array +// that contains a list of tasks when the ListTasks operation is called. A task +// includes the source and destination file systems to sync and the options +// to use for the tasks. +type TaskListEntry struct { + _ struct{} `type:"structure"` + + // The name of the task. + Name *string `min:"1" type:"string"` + + // The status of the task. + Status *string `type:"string" enum:"TaskStatus"` + + // The Amazon Resource Name (ARN) of the task. + TaskArn *string `type:"string"` +} + +// String returns the string representation +func (s TaskListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskListEntry) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *TaskListEntry) SetName(v string) *TaskListEntry { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *TaskListEntry) SetStatus(v string) *TaskListEntry { + s.Status = &v + return s +} + +// SetTaskArn sets the TaskArn field's value. +func (s *TaskListEntry) SetTaskArn(v string) *TaskListEntry { + s.TaskArn = &v + return s +} + +// UntagResourceRequest +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The keys in the key-value pair in the tag to remove. + // + // Keys is a required field + Keys []*string `min:"1" type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the resource to remove the tag from. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" 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.Keys == nil { + invalidParams.Add(request.NewErrParamRequired("Keys")) + } + if s.Keys != nil && len(s.Keys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Keys", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeys sets the Keys field's value. +func (s *UntagResourceInput) SetKeys(v []*string) *UntagResourceInput { + s.Keys = v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &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() +} + +// UpdateAgentRequest +type UpdateAgentInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the agent to update. + // + // AgentArn is a required field + AgentArn *string `type:"string" required:"true"` + + // The name that you want to use to configure the agent. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateAgentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAgentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAgentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAgentInput"} + if s.AgentArn == nil { + invalidParams.Add(request.NewErrParamRequired("AgentArn")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAgentArn sets the AgentArn field's value. +func (s *UpdateAgentInput) SetAgentArn(v string) *UpdateAgentInput { + s.AgentArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateAgentInput) SetName(v string) *UpdateAgentInput { + s.Name = &v + return s +} + +type UpdateAgentOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateAgentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAgentOutput) GoString() string { + return s.String() +} + +// UpdateTaskResponse +type UpdateTaskInput struct { + _ struct{} `type:"structure"` + + // The name of the task to update. + Name *string `min:"1" type:"string"` + + // Represents the options that are available to control the behavior of a StartTaskExecution + // operation. Behavior includes preserving metadata such as user ID (UID), group + // ID (GID), and file permissions, and also overwriting files in the destination, + // data integrity verification, and so on. + // + // A task has a set of default options associated with it. If you don't specify + // an option in StartTaskExecution, the default value is used. You can override + // the defaults options on each task execution by specifying an overriding Options + // value to StartTaskExecution. + Options *Options `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource name of the task to update. + // + // TaskArn is a required field + TaskArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTaskInput"} + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.TaskArn == nil { + invalidParams.Add(request.NewErrParamRequired("TaskArn")) + } + if s.Options != nil { + if err := s.Options.Validate(); err != nil { + invalidParams.AddNested("Options", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *UpdateTaskInput) SetName(v string) *UpdateTaskInput { + s.Name = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *UpdateTaskInput) SetOptions(v *Options) *UpdateTaskInput { + s.Options = v + return s +} + +// SetTaskArn sets the TaskArn field's value. +func (s *UpdateTaskInput) SetTaskArn(v string) *UpdateTaskInput { + s.TaskArn = &v + return s +} + +type UpdateTaskOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTaskOutput) GoString() string { + return s.String() +} + +const ( + // AgentStatusOnline is a AgentStatus enum value + AgentStatusOnline = "ONLINE" + + // AgentStatusOffline is a AgentStatus enum value + AgentStatusOffline = "OFFLINE" +) + +const ( + // AtimeNone is a Atime enum value + AtimeNone = "NONE" + + // AtimeBestEffort is a Atime enum value + AtimeBestEffort = "BEST_EFFORT" +) + +const ( + // GidNone is a Gid enum value + GidNone = "NONE" + + // GidIntValue is a Gid enum value + GidIntValue = "INT_VALUE" + + // GidName is a Gid enum value + GidName = "NAME" + + // GidBoth is a Gid enum value + GidBoth = "BOTH" +) + +const ( + // MtimeNone is a Mtime enum value + MtimeNone = "NONE" + + // MtimePreserve is a Mtime enum value + MtimePreserve = "PRESERVE" +) + +const ( + // PhaseStatusPending is a PhaseStatus enum value + PhaseStatusPending = "PENDING" + + // PhaseStatusSuccess is a PhaseStatus enum value + PhaseStatusSuccess = "SUCCESS" + + // PhaseStatusError is a PhaseStatus enum value + PhaseStatusError = "ERROR" +) + +const ( + // PosixPermissionsNone is a PosixPermissions enum value + PosixPermissionsNone = "NONE" + + // PosixPermissionsBestEffort is a PosixPermissions enum value + PosixPermissionsBestEffort = "BEST_EFFORT" + + // PosixPermissionsPreserve is a PosixPermissions enum value + PosixPermissionsPreserve = "PRESERVE" +) + +const ( + // PreserveDeletedFilesPreserve is a PreserveDeletedFiles enum value + PreserveDeletedFilesPreserve = "PRESERVE" + + // PreserveDeletedFilesRemove is a PreserveDeletedFiles enum value + PreserveDeletedFilesRemove = "REMOVE" +) + +const ( + // PreserveDevicesNone is a PreserveDevices enum value + PreserveDevicesNone = "NONE" + + // PreserveDevicesPreserve is a PreserveDevices enum value + PreserveDevicesPreserve = "PRESERVE" +) + +const ( + // TaskExecutionStatusLaunching is a TaskExecutionStatus enum value + TaskExecutionStatusLaunching = "LAUNCHING" + + // TaskExecutionStatusPreparing is a TaskExecutionStatus enum value + TaskExecutionStatusPreparing = "PREPARING" + + // TaskExecutionStatusTransferring is a TaskExecutionStatus enum value + TaskExecutionStatusTransferring = "TRANSFERRING" + + // TaskExecutionStatusVerifying is a TaskExecutionStatus enum value + TaskExecutionStatusVerifying = "VERIFYING" + + // TaskExecutionStatusSuccess is a TaskExecutionStatus enum value + TaskExecutionStatusSuccess = "SUCCESS" + + // TaskExecutionStatusError is a TaskExecutionStatus enum value + TaskExecutionStatusError = "ERROR" +) + +const ( + // TaskStatusAvailable is a TaskStatus enum value + TaskStatusAvailable = "AVAILABLE" + + // TaskStatusCreating is a TaskStatus enum value + TaskStatusCreating = "CREATING" + + // TaskStatusRunning is a TaskStatus enum value + TaskStatusRunning = "RUNNING" + + // TaskStatusUnavailable is a TaskStatus enum value + TaskStatusUnavailable = "UNAVAILABLE" +) + +const ( + // UidNone is a Uid enum value + UidNone = "NONE" + + // UidIntValue is a Uid enum value + UidIntValue = "INT_VALUE" + + // UidName is a Uid enum value + UidName = "NAME" + + // UidBoth is a Uid enum value + UidBoth = "BOTH" +) + +const ( + // VerifyModePointInTimeConsistent is a VerifyMode enum value + VerifyModePointInTimeConsistent = "POINT_IN_TIME_CONSISTENT" + + // VerifyModeNone is a VerifyMode enum value + VerifyModeNone = "NONE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/datasync/doc.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/doc.go new file mode 100644 index 000000000..9db8d0698 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/datasync/doc.go @@ -0,0 +1,33 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package datasync provides the client and types for making API +// requests to AWS DataSync. +// +// AWS DataSync is a managed data transfer service that makes it simpler for +// you to automate moving data between on-premises storage and Amazon Simple +// Storage Service (Amazon S3) or Amazon Elastic File System (Amazon EFS). +// +// This API interface reference for AWS DataSync contains documentation for +// a programming interface that you can use to manage AWS DataSync. +// +// See https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09 for more information on this service. +// +// See datasync package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/datasync/ +// +// Using the Client +// +// To contact AWS DataSync 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 DataSync client DataSync for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/datasync/#New +package datasync diff --git a/vendor/github.com/aws/aws-sdk-go/service/datasync/errors.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/errors.go new file mode 100644 index 000000000..bd7164f2f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/datasync/errors.go @@ -0,0 +1,12 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package datasync + +const ( + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // This exception is thrown when the client submits a malformed request. + ErrCodeInvalidRequestException = "InvalidRequestException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/datasync/service.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/service.go new file mode 100644 index 000000000..22d8ddcb9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/datasync/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package datasync + +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" +) + +// DataSync provides the API operation methods for making requests to +// AWS DataSync. See this package's package overview docs +// for details on the service. +// +// DataSync methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type DataSync 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 = "DataSync" // Name of service. + EndpointsID = "datasync" // ID to lookup a service endpoint with. + ServiceID = "DataSync" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the DataSync 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 DataSync client from just a session. +// svc := datasync.New(mySession) +// +// // Create a DataSync client with additional configuration +// svc := datasync.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *DataSync { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "datasync" + } + 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) *DataSync { + svc := &DataSync{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-11-09", + JSONVersion: "1.1", + TargetPrefix: "FmrsService", + }, + 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 DataSync operation and runs any +// custom request initialization. +func (c *DataSync) 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/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index d293332b7..fcda37568 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" @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -7579,6 +7589,22 @@ 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_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // + // * 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 +8307,9 @@ 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. + Availability *string `locationName:"availability" type:"string" enum:"DeviceAvailability"` + // The device's carrier. Carrier *string `locationName:"carrier" type:"string"` @@ -8368,6 +8397,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 +8517,111 @@ 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. + // + // * REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // + // * 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 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 +8846,158 @@ 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. + // + // REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // + // 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 operators can take a values array that has more than one element. + // + // 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 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 { @@ -10642,6 +10934,61 @@ 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. + // + // REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // + // 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 operators can take a values array that has more than one element. + // + // 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 +11026,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 +11830,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"` @@ -13217,29 +13569,35 @@ 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. // + // * REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // // * 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 +13616,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 +13686,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"` @@ -13535,6 +13902,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 +14251,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 are 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 are 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 +14294,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 +14311,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 +14346,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 +14400,22 @@ 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 +14426,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.7.2", + // "1.7.1", "1.6.5", "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.7.2). // // 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. // @@ -15657,6 +16051,22 @@ 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_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // + // * 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 +16349,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" 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 cfb3454ee..244425bd4 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" @@ -961,11 +963,12 @@ func (c *DirectConnect) CreateBGPPeerRequest(input *CreateBGPPeerInput) (req *re // // Creates a BGP peer on the specified virtual interface. // -// The BGP peer cannot be in the same address family (IPv4/IPv6) of an existing -// BGP peer on the virtual interface. +// 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. // -// You must create a BGP peer for the corresponding address family in order -// to access AWS resources that also use that address family. +// 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; @@ -1707,8 +1710,8 @@ func (c *DirectConnect) DeleteBGPPeerRequest(input *DeleteBGPPeerInput) (req *re // DeleteBGPPeer API operation for AWS Direct Connect. // -// Deletes the BGP peer on the specified virtual interface with the specified -// customer address and ASN. +// 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. // @@ -3695,6 +3698,7 @@ 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 } @@ -3787,6 +3791,7 @@ 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 } @@ -4524,6 +4529,9 @@ type BGPPeer struct { // The Direct Connect endpoint on which the BGP peer terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` + // 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 @@ -4595,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 @@ -4932,6 +4946,10 @@ type Connection struct { // 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"` @@ -5003,6 +5021,12 @@ 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 @@ -5638,6 +5662,9 @@ type DeleteBGPPeerInput struct { // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. Asn *int64 `locationName:"asn" type:"integer"` + // 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"` @@ -5661,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 @@ -7219,6 +7252,10 @@ type Interconnect struct { // 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. InterconnectId *string `locationName:"interconnectId" type:"string"` @@ -7287,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 @@ -7355,6 +7398,10 @@ type Lag struct { // 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"` @@ -7439,6 +7486,12 @@ 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 @@ -9109,6 +9162,17 @@ const ( GatewayStateDeleted = "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" 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 f7f0fa7c4..c14ce177c 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,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 opAcceptSharedDirectory = "AcceptSharedDirectory" @@ -142,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 } @@ -249,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 } @@ -342,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 } @@ -722,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 } @@ -916,6 +922,7 @@ func (c *DirectoryService) CreateLogSubscriptionRequest(input *CreateLogSubscrip output = &CreateLogSubscriptionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1306,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 } @@ -1490,6 +1498,7 @@ func (c *DirectoryService) DeleteLogSubscriptionRequest(input *DeleteLogSubscrip output = &DeleteLogSubscriptionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1758,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 } @@ -2576,6 +2586,7 @@ 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 } @@ -2663,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 } @@ -2754,6 +2766,7 @@ 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 } @@ -2847,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 } @@ -3466,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 } @@ -3651,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 } @@ -3742,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 } @@ -3830,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 } @@ -3929,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 } @@ -4336,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 } @@ -4430,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 } @@ -4533,6 +4554,7 @@ 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 } @@ -5248,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"` @@ -5477,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 @@ -5685,7 +5707,7 @@ type CreateDirectoryInput struct { // 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"` @@ -5887,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 @@ -6104,7 +6126,7 @@ 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. Forest is the default. TrustType *string `type:"string" enum:"TrustType"` @@ -7444,7 +7466,7 @@ type DirectoryDescription struct { // 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"` + ShareNotes *string `type:"string" sensitive:"true"` // Current directory status of the shared AWS Managed Microsoft AD directory. ShareStatus *string `type:"string" enum:"ShareStatus"` @@ -7900,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 @@ -8166,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 @@ -9003,7 +9025,7 @@ type RadiusSettings struct { RadiusTimeout *int64 `min:"1" type:"integer"` // Required for enabling RADIUS on the directory. - SharedSecret *string `min:"8" type:"string"` + SharedSecret *string `min:"8" type:"string" sensitive:"true"` // Not currently used. UseSameUsername *bool `type:"boolean"` @@ -9367,7 +9389,7 @@ 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 user name of the user whose password will be reset. // @@ -9594,7 +9616,7 @@ type ShareDirectoryInput struct { // 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"` + ShareNotes *string `type:"string" sensitive:"true"` // Identifier for the directory consumer account with whom the directory is // to be shared. @@ -9767,7 +9789,7 @@ type SharedDirectory struct { // 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"` + ShareNotes *string `type:"string" sensitive:"true"` // Current directory status of the shared AWS Managed Microsoft AD directory. ShareStatus *string `type:"string" enum:"ShareStatus"` 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 000000000..82d7778f1 --- /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 000000000..52f3edd73 --- /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 000000000..f2f7e4b92 --- /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 000000000..63b2a803e --- /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 551ef3a3f..bdd0505ea 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" @@ -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. // @@ -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. // @@ -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. @@ -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 } @@ -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 } @@ -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. @@ -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. // @@ -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 } @@ -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 } @@ -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 } @@ -1332,6 +1562,65 @@ 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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. // @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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. // @@ -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. // @@ -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. @@ -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 } @@ -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. // @@ -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,6 +3826,342 @@ func (c *DynamoDB) TagResourceWithContext(ctx aws.Context, input *TagResourceInp return out, req.Send() } +const opTransactGetItems = "TransactGetItems" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/TransactGetItems +func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *request.Request, output *TransactGetItemsOutput) { + op := &request.Operation{ + Name: opTransactGetItems, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TransactGetItemsInput{} + } + + output = &TransactGetItemsOutput{} + 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 +} + +// TransactGetItems API operation for Amazon DynamoDB. +// +// 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. +// +// 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 TransactGetItems 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. +// +// * 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. +// +// * 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 @@ -3218,8 +4201,28 @@ func (c *DynamoDB) 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) + 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 } @@ -3325,6 +4328,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 } @@ -3421,6 +4445,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 } @@ -3532,6 +4577,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 } @@ -3638,6 +4704,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 +4766,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. // @@ -3743,6 +4838,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 } @@ -3861,6 +4977,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 +5864,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 +5952,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 +6445,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 +6538,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 +6562,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 +6685,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 +6804,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 +6845,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 +6863,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 +7013,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 +7044,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 +7221,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 +7337,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 +7398,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 +7462,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 +7534,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 +8793,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,6 +8857,87 @@ func (s *ExpectedAttributeValue) SetValue(v *AttributeValue) *ExpectedAttributeV return s } +// Specifies an item and related attribute values to retrieve in a TransactGetItem +// object. +type Get struct { + _ struct{} `type:"structure"` + + // 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"` @@ -7638,9 +9189,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 +9220,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 +9780,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 +10844,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 +10854,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 +10925,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 +10972,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 +12165,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 +12178,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 +12187,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 +12217,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 +12655,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 +12709,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 +12722,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 +13239,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 +13294,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 +13476,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 +13688,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 @@ -12318,6 +14029,392 @@ func (s *TimeToLiveSpecification) SetEnabled(v bool) *TimeToLiveSpecification { 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 +} + +// SetPut sets the Put field's value. +func (s *TransactWriteItem) SetPut(v *Put) *TransactWriteItem { + s.Put = v + return s +} + +// 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"` + + // Providing a ClientRequestToken makes the call to TransactWriteItems idempotent, + // meaning that multiple identical calls have the same effect as one single + // call. + // + // 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 `type:"string" idempotencyToken:"true"` + + // Determines the level of detail about provisioned throughput consumption that + // is returned in the response: + // + // * 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 TransactWriteItemsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransactWriteItemsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransactWriteItemsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransactWriteItemsInput"} + 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 +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *TransactWriteItemsInput) SetClientRequestToken(v string) *TransactWriteItemsInput { + s.ClientRequestToken = &v + return s +} + +// SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. +func (s *TransactWriteItemsInput) SetReturnConsumedCapacity(v string) *TransactWriteItemsInput { + s.ReturnConsumedCapacity = &v + return s +} + +// SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value. +func (s *TransactWriteItemsInput) SetReturnItemCollectionMetrics(v string) *TransactWriteItemsInput { + s.ReturnItemCollectionMetrics = &v + return s +} + +// SetTransactItems sets the TransactItems field's value. +func (s *TransactWriteItemsInput) SetTransactItems(v []*TransactWriteItem) *TransactWriteItemsInput { + s.TransactItems = v + return s +} + +type TransactWriteItemsOutput struct { + _ struct{} `type:"structure"` + + // 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"` + + // 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 TransactWriteItemsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransactWriteItemsOutput) GoString() string { + return s.String() +} + +// SetConsumedCapacity sets the ConsumedCapacity field's value. +func (s *TransactWriteItemsOutput) SetConsumedCapacity(v []*ConsumedCapacity) *TransactWriteItemsOutput { + s.ConsumedCapacity = v + return s +} + +// SetItemCollectionMetrics sets the ItemCollectionMetrics field's value. +func (s *TransactWriteItemsOutput) SetItemCollectionMetrics(v map[string][]*ItemCollectionMetrics) *TransactWriteItemsOutput { + s.ItemCollectionMetrics = v + return s +} + type UntagResourceInput struct { _ struct{} `type:"structure"` @@ -12389,6 +14486,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 +14838,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 +14923,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 +15406,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 +15509,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 +15731,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 +15916,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 4abbbe663..175647742 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 346f52ce4..edcb5b859 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 bc96eea57..0431f377c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -88,6 +88,84 @@ 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 @@ -243,6 +321,95 @@ 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 @@ -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 @@ -528,24 +702,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 @@ -712,8 +892,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 } @@ -992,6 +1171,81 @@ 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 @@ -1196,8 +1450,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 } @@ -1527,8 +1780,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 } @@ -1620,8 +1872,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 } @@ -1829,6 +2080,87 @@ 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 @@ -1868,8 +2200,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 } @@ -1951,8 +2282,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 } @@ -2629,6 +2959,103 @@ 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 opCreateCustomerGateway = "CreateCustomerGateway" // CreateCustomerGatewayRequest generates a "aws/request.Request" representing the @@ -4007,8 +4434,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 } @@ -4255,8 +4681,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 } @@ -4989,8 +5414,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 } @@ -5034,6 +5458,328 @@ 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 @@ -5690,8 +6436,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 } @@ -5853,8 +6598,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 } @@ -5930,8 +6674,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 } @@ -6311,8 +7054,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 } @@ -6388,8 +7130,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 } @@ -6692,8 +7433,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 } @@ -6769,8 +7509,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 } @@ -6846,8 +7585,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 } @@ -7000,8 +7738,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 } @@ -7079,8 +7816,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 } @@ -7155,8 +7891,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 } @@ -7233,8 +7968,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 } @@ -7313,8 +8047,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 } @@ -7403,8 +8136,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 } @@ -7479,8 +8211,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 } @@ -7556,8 +8287,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 } @@ -7597,6 +8327,304 @@ 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 @@ -7636,8 +8664,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 } @@ -7718,8 +8745,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 } @@ -8104,8 +9130,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 } @@ -8189,8 +9214,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 } @@ -8268,8 +9292,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 } @@ -8309,6 +9332,86 @@ 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 @@ -8348,8 +9451,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 } @@ -8810,6 +9912,158 @@ 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 @@ -9238,8 +10492,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 @@ -9535,7 +10790,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 @@ -12161,6 +13416,80 @@ 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 @@ -12718,6 +14047,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 { @@ -12769,6 +14104,56 @@ 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 @@ -13031,6 +14416,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 { @@ -13081,6 +14472,56 @@ 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 @@ -13533,7 +14974,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 @@ -14203,6 +15644,308 @@ 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 @@ -15768,8 +17511,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 } @@ -15846,8 +17588,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 } @@ -16009,8 +17750,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 } @@ -16053,6 +17793,81 @@ 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 @@ -16092,8 +17907,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 } @@ -16322,8 +18136,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 } @@ -16482,8 +18295,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 } @@ -16600,6 +18412,80 @@ 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 @@ -16680,6 +18566,81 @@ 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 @@ -16719,8 +18680,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 } @@ -16796,8 +18756,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 } @@ -16994,6 +18953,82 @@ func (c *EC2) EnableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input * 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 @@ -17482,6 +19517,231 @@ 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 opImportImage = "ImportImage" // ImportImageRequest generates a "aws/request.Request" representing the @@ -17872,6 +20132,85 @@ 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 opModifyFleet = "ModifyFleet" // ModifyFleetRequest generates a "aws/request.Request" representing the @@ -18141,8 +20480,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 } @@ -18239,8 +20577,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 } @@ -18337,8 +20674,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 } @@ -18422,8 +20758,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 } @@ -18470,6 +20805,83 @@ 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 @@ -18758,8 +21170,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 } @@ -18915,8 +21326,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 } @@ -19099,8 +21509,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 } @@ -19136,6 +21545,80 @@ 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 @@ -19280,8 +21763,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 } @@ -19365,8 +21847,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 } @@ -19770,12 +22251,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 @@ -20048,6 +22533,96 @@ 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 @@ -20330,8 +22905,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 } @@ -20482,6 +23056,84 @@ 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 @@ -20674,8 +23326,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 } @@ -21009,8 +23660,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 } @@ -21087,8 +23737,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 } @@ -21212,6 +23861,80 @@ 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 @@ -21251,8 +23974,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 } @@ -21583,8 +24305,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 } @@ -21661,8 +24382,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 } @@ -21745,8 +24465,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 } @@ -21822,8 +24541,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 } @@ -21979,8 +24697,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 } @@ -22067,8 +24784,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 } @@ -22330,6 +25046,80 @@ 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 @@ -22472,6 +25262,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 @@ -22482,20 +25278,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. +// 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 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) +// 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 @@ -22743,8 +25544,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 } @@ -23016,6 +25816,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"` @@ -23112,6 +25993,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"` @@ -23398,6 +26352,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"` } @@ -23460,17 +26417,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. @@ -23483,6 +26519,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 @@ -23513,7 +26554,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"` @@ -23527,6 +26573,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 @@ -23557,6 +26606,12 @@ func (s *AllocateAddressOutput) SetPublicIp(v string) *AllocateAddressOutput { return s } +// 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"` @@ -23894,7 +26949,6 @@ func (s AssignPrivateIpAddressesOutput) GoString() string { return s.String() } -// Contains the parameters for AssociateAddress. type AssociateAddressInput struct { _ struct{} `type:"structure"` @@ -23986,7 +27040,6 @@ func (s *AssociateAddressInput) SetPublicIp(v string) *AssociateAddressInput { return s } -// Contains the output of AssociateAddress. type AssociateAddressOutput struct { _ struct{} `type:"structure"` @@ -24337,6 +27390,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"` @@ -25226,6 +28366,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"` } @@ -25258,6 +28401,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 @@ -25626,6 +28775,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"` @@ -25701,6 +28903,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"` @@ -26307,6 +29582,401 @@ 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 +} + +// 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"` @@ -26558,7 +30228,6 @@ func (s *ClientData) SetUploadStart(v time.Time) *ClientData { return s } -// Contains the parameters for ConfirmProductInstance. type ConfirmProductInstanceInput struct { _ struct{} `type:"structure"` @@ -26623,7 +30292,6 @@ func (s *ConfirmProductInstanceInput) SetProductCode(v string) *ConfirmProductIn return s } -// Contains the output of ConfirmProductInstance. type ConfirmProductInstanceOutput struct { _ struct{} `type:"structure"` @@ -27358,6 +31026,242 @@ func (s *CpuOptionsRequest) SetThreadsPerCore(v int64) *CpuOptionsRequest { 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 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"` + + // Checks whether you have the required permissions for the action, without + // actually making 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 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. + // + // 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"` + + // 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"` + + // 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 CreateCapacityReservationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCapacityReservationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateCapacityReservationInput) SetAvailabilityZone(v string) *CreateCapacityReservationInput { + s.AvailabilityZone = &v + return s +} + +// 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 *CreateCapacityReservationInput) SetDryRun(v bool) *CreateCapacityReservationInput { + s.DryRun = &v + return s +} + +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *CreateCapacityReservationInput) SetEbsOptimized(v bool) *CreateCapacityReservationInput { + s.EbsOptimized = &v + return s +} + +// SetEndDate sets the EndDate field's value. +func (s *CreateCapacityReservationInput) SetEndDate(v time.Time) *CreateCapacityReservationInput { + s.EndDate = &v + return s +} + +// SetEndDateType sets the EndDateType field's value. +func (s *CreateCapacityReservationInput) SetEndDateType(v string) *CreateCapacityReservationInput { + s.EndDateType = &v + return s +} + +// SetEphemeralStorage sets the EphemeralStorage field's value. +func (s *CreateCapacityReservationInput) SetEphemeralStorage(v bool) *CreateCapacityReservationInput { + s.EphemeralStorage = &v + return s +} + +// SetInstanceCount sets the InstanceCount field's value. +func (s *CreateCapacityReservationInput) SetInstanceCount(v int64) *CreateCapacityReservationInput { + s.InstanceCount = &v + return s +} + +// 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 CreateCapacityReservationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCapacityReservationOutput) GoString() string { + return s.String() +} + +// SetCapacityReservation sets the CapacityReservation field's value. +func (s *CreateCapacityReservationOutput) SetCapacityReservation(v *CapacityReservation) *CreateCapacityReservationOutput { + s.CapacityReservation = v + return s +} + // Contains the parameters for CreateCustomerGateway. type CreateCustomerGatewayInput struct { _ struct{} `type:"structure"` @@ -27752,6 +31656,62 @@ func (s *CreateEgressOnlyInternetGatewayOutput) SetEgressOnlyInternetGateway(v * return s } +// Describes the instances that could not be launched by the fleet. +type CreateFleetError struct { + _ struct{} `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 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 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 CreateFleetError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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"` @@ -27800,14 +31760,14 @@ type CreateFleetInput struct { // expires. TerminateInstancesWithExpiration *bool `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. + // 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). @@ -27939,11 +31899,82 @@ func (s *CreateFleetInput) SetValidUntil(v time.Time) *CreateFleetInput { return s } +// Describes the instances that were launched by the fleet. +type CreateFleetInstance struct { + _ struct{} `type:"structure"` + + // The IDs of the instances. + InstanceIds []*string `locationName:"instanceIds" locationNameList:"item" type:"list"` + + // 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 CreateFleetInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetInstance) GoString() string { + return s.String() +} + +// SetInstanceIds sets the InstanceIds field's value. +func (s *CreateFleetInstance) SetInstanceIds(v []*string) *CreateFleetInstance { + s.InstanceIds = v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *CreateFleetInstance) SetInstanceType(v string) *CreateFleetInstance { + s.InstanceType = &v + return s +} + +// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. +func (s *CreateFleetInstance) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *CreateFleetInstance { + s.LaunchTemplateAndOverrides = v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *CreateFleetInstance) SetLifecycle(v string) *CreateFleetInstance { + s.Lifecycle = &v + return s +} + +// 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 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 @@ -27956,12 +31987,24 @@ func (s CreateFleetOutput) GoString() string { return s.String() } +// SetErrors sets the Errors field's value. +func (s *CreateFleetOutput) SetErrors(v []*CreateFleetError) *CreateFleetOutput { + s.Errors = v + return s +} + // 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"` @@ -28989,8 +33032,8 @@ type CreateNetworkAclEntryInput struct { // 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. + // 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). @@ -29001,16 +33044,17 @@ type CreateNetworkAclEntryInput struct { // 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. + // 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. 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. + // 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"` @@ -29474,7 +33518,6 @@ func (s *CreateNetworkInterfacePermissionOutput) SetInterfacePermission(v *Netwo return s } -// Contains the parameters for CreatePlacementGroup. type CreatePlacementGroupInput struct { _ struct{} `type:"structure"` @@ -29706,6 +33749,9 @@ type CreateRouteInput struct { // 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"` } @@ -29787,6 +33833,12 @@ func (s *CreateRouteInput) SetRouteTableId(v string) *CreateRouteInput { 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 @@ -30159,6 +34211,9 @@ type CreateSubnetInput struct { // VPC, we may not necessarily select a different zone for each subnet. AvailabilityZone *string `type:"string"` + // The AZ ID of the subnet. + AvailabilityZoneId *string `type:"string"` + // The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. // // CidrBlock is a required field @@ -30212,6 +34267,12 @@ func (s *CreateSubnetInput) SetAvailabilityZone(v string) *CreateSubnetInput { return s } +// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. +func (s *CreateSubnetInput) SetAvailabilityZoneId(v string) *CreateSubnetInput { + s.AvailabilityZoneId = &v + return s +} + // SetCidrBlock sets the CidrBlock field's value. func (s *CreateSubnetInput) SetCidrBlock(v string) *CreateSubnetInput { s.CidrBlock = &v @@ -30268,7 +34329,7 @@ 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. + // The IDs of one or more resources, separated by spaces. // // Resources is a required field Resources []*string `locationName:"ResourceId" type:"list" required:"true"` @@ -30339,6 +34400,425 @@ func (s CreateTagsOutput) GoString() string { return s.String() } +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 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 CreateTransitGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayInput) GoString() string { + return s.String() +} + +// 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 *CreateTransitGatewayInput) SetDryRun(v bool) *CreateTransitGatewayInput { + s.DryRun = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *CreateTransitGatewayInput) SetOptions(v *TransitGatewayRequestOptions) *CreateTransitGatewayInput { + s.Options = v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTransitGatewayInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayInput { + s.TagSpecifications = v + return s +} + +type CreateTransitGatewayOutput struct { + _ struct{} `type:"structure"` + + // Information about the transit gateway. + TransitGateway *TransitGateway `locationName:"transitGateway" type:"structure"` +} + +// String returns the string representation +func (s CreateTransitGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayOutput) GoString() string { + return s.String() +} + +// SetTransitGateway sets the TransitGateway field's value. +func (s *CreateTransitGatewayOutput) SetTransitGateway(v *TransitGateway) *CreateTransitGatewayOutput { + s.TransitGateway = v + return s +} + +type CreateTransitGatewayRouteInput struct { + _ struct{} `type:"structure"` + + // Indicates whether traffic matching this route is to be dropped. + Blackhole *bool `type:"boolean"` + + // 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 + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the attachment. + TransitGatewayAttachmentId *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 CreateTransitGatewayRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTransitGatewayRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + 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 *CreateTransitGatewayRouteInput) SetDryRun(v bool) *CreateTransitGatewayRouteInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *CreateTransitGatewayRouteInput) SetTransitGatewayAttachmentId(v string) *CreateTransitGatewayRouteInput { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *CreateTransitGatewayRouteInput) SetTransitGatewayRouteTableId(v string) *CreateTransitGatewayRouteInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type CreateTransitGatewayRouteOutput struct { + _ struct{} `type:"structure"` + + // Information about the route. + Route *TransitGatewayRoute `locationName:"route" type:"structure"` +} + +// String returns the string representation +func (s CreateTransitGatewayRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayRouteOutput) GoString() string { + return s.String() +} + +// SetRoute sets the Route field's value. +func (s *CreateTransitGatewayRouteOutput) SetRoute(v *TransitGatewayRoute) *CreateTransitGatewayRouteOutput { + s.Route = v + return s +} + +type CreateTransitGatewayRouteTableInput 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 tags to apply to the transit gateway route table. + TagSpecifications []*TagSpecification `locationNameList:"item" type:"list"` + + // The ID of the transit gateway. + // + // TransitGatewayId is a required field + TransitGatewayId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateTransitGatewayRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayRouteTableInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTransitGatewayRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayRouteTableInput"} + if s.TransitGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateTransitGatewayRouteTableInput) SetDryRun(v bool) *CreateTransitGatewayRouteTableInput { + s.DryRun = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTransitGatewayRouteTableInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayRouteTableInput { + s.TagSpecifications = v + return s +} + +// 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 transit gateway route table. + TransitGatewayRouteTable *TransitGatewayRouteTable `locationName:"transitGatewayRouteTable" type:"structure"` +} + +// String returns the string representation +func (s CreateTransitGatewayRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayRouteTableOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayRouteTable sets the TransitGatewayRouteTable field's value. +func (s *CreateTransitGatewayRouteTableOutput) SetTransitGatewayRouteTable(v *TransitGatewayRouteTable) *CreateTransitGatewayRouteTableOutput { + s.TransitGatewayRouteTable = v + return s +} + +type CreateTransitGatewayVpcAttachmentInput 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 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. + // + // 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 CreateTransitGatewayVpcAttachmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayVpcAttachmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *CreateTransitGatewayVpcAttachmentInput { + s.DryRun = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetOptions(v *CreateTransitGatewayVpcAttachmentRequestOptions) *CreateTransitGatewayVpcAttachmentInput { + s.Options = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetSubnetIds(v []*string) *CreateTransitGatewayVpcAttachmentInput { + s.SubnetIds = v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayVpcAttachmentInput { + s.TagSpecifications = v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetTransitGatewayId(v string) *CreateTransitGatewayVpcAttachmentInput { + s.TransitGatewayId = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetVpcId(v string) *CreateTransitGatewayVpcAttachmentInput { + s.VpcId = &v + return s +} + +type CreateTransitGatewayVpcAttachmentOutput struct { + _ struct{} `type:"structure"` + + // Information about the VPC attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` +} + +// String returns the string representation +func (s CreateTransitGatewayVpcAttachmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayVpcAttachmentOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. +func (s *CreateTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *CreateTransitGatewayVpcAttachmentOutput { + s.TransitGatewayVpcAttachment = v + return s +} + +// 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 CreateTransitGatewayVpcAttachmentRequestOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayVpcAttachmentRequestOptions) GoString() string { + return s.String() +} + +// SetDnsSupport sets the DnsSupport field's value. +func (s *CreateTransitGatewayVpcAttachmentRequestOptions) SetDnsSupport(v string) *CreateTransitGatewayVpcAttachmentRequestOptions { + s.DnsSupport = &v + return s +} + +// SetIpv6Support sets the Ipv6Support field's value. +func (s *CreateTransitGatewayVpcAttachmentRequestOptions) SetIpv6Support(v string) *CreateTransitGatewayVpcAttachmentRequestOptions { + s.Ipv6Support = &v + return s +} + // Contains the parameters for CreateVolume. type CreateVolumeInput struct { _ struct{} `type:"structure"` @@ -30365,8 +34845,11 @@ type CreateVolumeInput struct { 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 32000 IOPS for volumes - // in most regions. For exceptions, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 64,000IOPS 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. @@ -30401,9 +34884,9 @@ type CreateVolumeInput struct { // 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. + // 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. @@ -31198,15 +35681,18 @@ type CreateVpnConnectionInput struct { // The options for the VPN connection. Options *VpnConnectionOptionsSpecification `locationName:"options" type:"structure"` + // 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). // // Type is a required field Type *string `type:"string" required:"true"` - // The ID of the virtual private gateway. - // - // VpnGatewayId is a required field - VpnGatewayId *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 @@ -31228,9 +35714,6 @@ func (s *CreateVpnConnectionInput) Validate() error { if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } - if s.VpnGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) - } if invalidParams.Len() > 0 { return invalidParams @@ -31256,6 +35739,12 @@ func (s *CreateVpnConnectionInput) SetOptions(v *VpnConnectionOptionsSpecificati return s } +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *CreateVpnConnectionInput) SetTransitGatewayId(v string) *CreateVpnConnectionInput { + s.TransitGatewayId = &v + return s +} + // SetType sets the Type field's value. func (s *CreateVpnConnectionInput) SetType(v string) *CreateVpnConnectionInput { s.Type = &v @@ -32920,7 +37409,6 @@ func (s *DeleteNetworkInterfacePermissionOutput) SetReturn(v bool) *DeleteNetwor return s } -// Contains the parameters for DeletePlacementGroup. type DeletePlacementGroupInput struct { _ struct{} `type:"structure"` @@ -33371,7 +37859,7 @@ type DeleteTagsInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The IDs of one or more resources. + // The IDs of one or more resources, separated by spaces. // // Resources is a required field Resources []*string `locationName:"resourceId" type:"list" required:"true"` @@ -33442,6 +37930,312 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +type DeleteTransitGatewayInput 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 transit gateway. + // + // TransitGatewayId is a required field + TransitGatewayId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTransitGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTransitGatewayInput) SetDryRun(v bool) *DeleteTransitGatewayInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *DeleteTransitGatewayInput) SetTransitGatewayId(v string) *DeleteTransitGatewayInput { + s.TransitGatewayId = &v + return s +} + +type DeleteTransitGatewayOutput struct { + _ struct{} `type:"structure"` + + // Information about the deleted transit gateway. + TransitGateway *TransitGateway `locationName:"transitGateway" type:"structure"` +} + +// 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 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"` + + // 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 DeleteTransitGatewayRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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 { + return invalidParams + } + return nil +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *DeleteTransitGatewayRouteInput) SetDestinationCidrBlock(v string) *DeleteTransitGatewayRouteInput { + s.DestinationCidrBlock = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTransitGatewayRouteInput) SetDryRun(v bool) *DeleteTransitGatewayRouteInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *DeleteTransitGatewayRouteInput) SetTransitGatewayRouteTableId(v string) *DeleteTransitGatewayRouteInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type DeleteTransitGatewayRouteOutput struct { + _ struct{} `type:"structure"` + + // Information about the route. + Route *TransitGatewayRoute `locationName:"route" type:"structure"` +} + +// String returns the string representation +func (s DeleteTransitGatewayRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayRouteOutput) GoString() string { + return s.String() +} + +// SetRoute sets the Route field's value. +func (s *DeleteTransitGatewayRouteOutput) SetRoute(v *TransitGatewayRoute) *DeleteTransitGatewayRouteOutput { + s.Route = v + return s +} + +type DeleteTransitGatewayRouteTableInput 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 transit gateway route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTransitGatewayRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayRouteTableInput) GoString() string { + return s.String() +} + +// 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")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTransitGatewayRouteTableInput) SetDryRun(v bool) *DeleteTransitGatewayRouteTableInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *DeleteTransitGatewayRouteTableInput) SetTransitGatewayRouteTableId(v string) *DeleteTransitGatewayRouteTableInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type DeleteTransitGatewayRouteTableOutput struct { + _ struct{} `type:"structure"` + + // Information about the deleted transit gateway route table. + TransitGatewayRouteTable *TransitGatewayRouteTable `locationName:"transitGatewayRouteTable" type:"structure"` +} + +// String returns the string representation +func (s DeleteTransitGatewayRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayRouteTableOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayRouteTable sets the TransitGatewayRouteTable field's value. +func (s *DeleteTransitGatewayRouteTableOutput) SetTransitGatewayRouteTable(v *TransitGatewayRouteTable) *DeleteTransitGatewayRouteTableOutput { + s.TransitGatewayRouteTable = v + return s +} + +type DeleteTransitGatewayVpcAttachmentInput 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 DeleteTransitGatewayVpcAttachmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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 *DeleteTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *DeleteTransitGatewayVpcAttachmentInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *DeleteTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *DeleteTransitGatewayVpcAttachmentInput { + s.TransitGatewayAttachmentId = &v + return s +} + +type DeleteTransitGatewayVpcAttachmentOutput struct { + _ struct{} `type:"structure"` + + // Information about the deleted VPC attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` +} + +// String returns the string representation +func (s DeleteTransitGatewayVpcAttachmentOutput) String() string { + return awsutil.Prettify(s) +} + +// 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 parameters for DeleteVolume. type DeleteVolumeInput struct { _ struct{} `type:"structure"` @@ -34062,6 +38856,80 @@ func (s DeleteVpnGatewayOutput) GoString() string { return s.String() } +type DeprovisionByoipCidrInput struct { + _ struct{} `type:"structure"` + + // The public IPv4 address range, in CIDR notation. The prefix must be the same + // prefix that you specified when you provisioned the address range. + // + // 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 DeprovisionByoipCidrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprovisionByoipCidrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeprovisionByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeprovisionByoipCidrInput"} + 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 *DeprovisionByoipCidrInput) SetCidr(v string) *DeprovisionByoipCidrInput { + s.Cidr = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DeprovisionByoipCidrInput) SetDryRun(v bool) *DeprovisionByoipCidrInput { + s.DryRun = &v + return s +} + +type DeprovisionByoipCidrOutput struct { + _ struct{} `type:"structure"` + + // Information about the address range. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` +} + +// String returns the string representation +func (s DeprovisionByoipCidrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprovisionByoipCidrOutput) GoString() string { + return s.String() +} + +// SetByoipCidr sets the ByoipCidr field's value. +func (s *DeprovisionByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *DeprovisionByoipCidrOutput { + s.ByoipCidr = v + return s +} + // Contains the parameters for DeregisterImage. type DeregisterImageInput struct { _ struct{} `type:"structure"` @@ -34127,7 +38995,6 @@ func (s DeregisterImageOutput) GoString() string { return s.String() } -// Contains the parameters for DescribeAccountAttributes. type DescribeAccountAttributesInput struct { _ struct{} `type:"structure"` @@ -34163,7 +39030,6 @@ func (s *DescribeAccountAttributesInput) SetDryRun(v bool) *DescribeAccountAttri return s } -// Contains the output of DescribeAccountAttributes. type DescribeAccountAttributesOutput struct { _ struct{} `type:"structure"` @@ -34187,7 +39053,6 @@ func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttri return s } -// Contains the parameters for DescribeAddresses. type DescribeAddressesInput struct { _ struct{} `type:"structure"` @@ -34275,7 +39140,6 @@ func (s *DescribeAddressesInput) SetPublicIps(v []*string) *DescribeAddressesInp return s } -// Contains the output of DescribeAddresses. type DescribeAddressesOutput struct { _ struct{} `type:"structure"` @@ -34359,7 +39223,6 @@ func (s *DescribeAggregateIdFormatOutput) SetUseLongIdsAggregated(v bool) *Descr return s } -// Contains the parameters for DescribeAvailabilityZones. type DescribeAvailabilityZonesInput struct { _ struct{} `type:"structure"` @@ -34379,9 +39242,14 @@ type DescribeAvailabilityZonesInput struct { // * 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 IDs of one or more Availability Zones. + ZoneIds []*string `locationName:"ZoneId" locationNameList:"ZoneId" type:"list"` + // The names of one or more Availability Zones. ZoneNames []*string `locationName:"ZoneName" locationNameList:"ZoneName" type:"list"` } @@ -34408,13 +39276,18 @@ func (s *DescribeAvailabilityZonesInput) SetFilters(v []*Filter) *DescribeAvaila return s } +// SetZoneIds sets the ZoneIds field's value. +func (s *DescribeAvailabilityZonesInput) SetZoneIds(v []*string) *DescribeAvailabilityZonesInput { + s.ZoneIds = v + return s +} + // SetZoneNames sets the ZoneNames field's value. func (s *DescribeAvailabilityZonesInput) SetZoneNames(v []*string) *DescribeAvailabilityZonesInput { s.ZoneNames = v return s } -// Contains the output of DescribeAvailabiltyZones. type DescribeAvailabilityZonesOutput struct { _ struct{} `type:"structure"` @@ -34531,6 +39404,202 @@ func (s *DescribeBundleTasksOutput) SetBundleTasks(v []*BundleTask) *DescribeBun 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 `type:"boolean"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + // + // MaxResults 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 DescribeByoipCidrsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeByoipCidrsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeByoipCidrsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeByoipCidrsInput"} + if s.MaxResults == nil { + invalidParams.Add(request.NewErrParamRequired("MaxResults")) + } + 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 *DescribeByoipCidrsInput) SetDryRun(v bool) *DescribeByoipCidrsInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeByoipCidrsInput) SetMaxResults(v int64) *DescribeByoipCidrsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeByoipCidrsInput) SetNextToken(v string) *DescribeByoipCidrsInput { + s.NextToken = &v + return s +} + +type DescribeByoipCidrsOutput struct { + _ struct{} `type:"structure"` + + // Information about your address ranges. + ByoipCidrs []*ByoipCidr `locationName:"byoipCidrSet" 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 DescribeByoipCidrsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeByoipCidrsOutput) GoString() string { + return s.String() +} + +// SetByoipCidrs sets the ByoipCidrs field's value. +func (s *DescribeByoipCidrsOutput) SetByoipCidrs(v []*ByoipCidr) *DescribeByoipCidrsOutput { + s.ByoipCidrs = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeByoipCidrsOutput) SetNextToken(v string) *DescribeByoipCidrsOutput { + s.NextToken = &v + return s +} + +type DescribeCapacityReservationsInput struct { + _ struct{} `type:"structure"` + + // The ID of the Capacity Reservation. + CapacityReservationIds []*string `locationName:"CapacityReservationId" 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. + 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 returned + // nextToken value. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeCapacityReservationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCapacityReservationsInput) GoString() string { + return s.String() +} + +// SetCapacityReservationIds sets the CapacityReservationIds field's value. +func (s *DescribeCapacityReservationsInput) SetCapacityReservationIds(v []*string) *DescribeCapacityReservationsInput { + s.CapacityReservationIds = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeCapacityReservationsInput) SetDryRun(v bool) *DescribeCapacityReservationsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeCapacityReservationsInput) SetFilters(v []*Filter) *DescribeCapacityReservationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeCapacityReservationsInput) SetMaxResults(v int64) *DescribeCapacityReservationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeCapacityReservationsInput) SetNextToken(v string) *DescribeCapacityReservationsInput { + s.NextToken = &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"` +} + +// 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 +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeCapacityReservationsOutput) SetNextToken(v string) *DescribeCapacityReservationsOutput { + s.NextToken = &v + return s +} + type DescribeClassicLinkInstancesInput struct { _ struct{} `type:"structure"` @@ -34823,12 +39892,14 @@ type DescribeDhcpOptionsInput struct { // One or more filters. // - // * dhcp-options-id - The ID of a set of DHCP options. + // * dhcp-options-id - The ID of a DHCP options set. // // * 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. // For example, to find all resources that have a tag with the key Owner @@ -34989,20 +40060,24 @@ type DescribeElasticGpusInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more Elastic GPU IDs. + // One or more Elastic Graphics accelerator IDs. ElasticGpuIds []*string `locationName:"ElasticGpuId" locationNameList:"item" type:"list"` // One or more filters. // - // * availability-zone - The Availability Zone in which the Elastic GPU resides. + // * availability-zone - The Availability Zone in which the Elastic Graphics + // accelerator resides. // - // * elastic-gpu-health - The status of the Elastic GPU (OK | IMPAIRED). + // * elastic-gpu-health - The status of the Elastic Graphics accelerator + // (OK | IMPAIRED). // - // * elastic-gpu-state - The state of the Elastic GPU (ATTACHED). + // * elastic-gpu-state - The state of the Elastic Graphics accelerator (ATTACHED). // - // * elastic-gpu-type - The type of Elastic GPU; for example, eg1.medium. + // * elastic-gpu-type - The type of Elastic Graphics accelerator; for example, + // eg1.medium. // - // * instance-id - The ID of the instance to which the Elastic GPU is associated. + // * 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 results to return in a single call. To retrieve the @@ -35057,7 +40132,7 @@ func (s *DescribeElasticGpusInput) SetNextToken(v string) *DescribeElasticGpusIn type DescribeElasticGpusOutput struct { _ struct{} `type:"structure"` - // Information about the Elastic GPUs. + // 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 @@ -35146,6 +40221,62 @@ func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExp return s } +// Describes the instances that could not be launched by the fleet. +type DescribeFleetError struct { + _ struct{} `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 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 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 DescribeFleetError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetError) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *DescribeFleetError) SetErrorCode(v string) *DescribeFleetError { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *DescribeFleetError) SetErrorMessage(v string) *DescribeFleetError { + s.ErrorMessage = &v + return s +} + +// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. +func (s *DescribeFleetError) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *DescribeFleetError { + s.LaunchTemplateAndOverrides = v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *DescribeFleetError) SetLifecycle(v string) *DescribeFleetError { + s.Lifecycle = &v + return s +} + type DescribeFleetHistoryInput struct { _ struct{} `type:"structure"` @@ -35448,7 +40579,7 @@ type DescribeFleetsInput struct { // * replace-unhealthy-instances - Indicates whether EC2 Fleet should replace // unhealthy instances (true | false). // - // * type - The type of request (request | maintain). + // * type - The type of request (instant | request | maintain). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The ID of the EC2 Fleets. @@ -35503,6 +40634,69 @@ func (s *DescribeFleetsInput) SetNextToken(v string) *DescribeFleetsInput { return s } +// Describes the instances that were launched by the fleet. +type DescribeFleetsInstances struct { + _ struct{} `type:"structure"` + + // The IDs of the instances. + InstanceIds []*string `locationName:"instanceIds" locationNameList:"item" type:"list"` + + // 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 DescribeFleetsInstances) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetsInstances) GoString() string { + return s.String() +} + +// SetInstanceIds sets the InstanceIds field's value. +func (s *DescribeFleetsInstances) SetInstanceIds(v []*string) *DescribeFleetsInstances { + s.InstanceIds = v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *DescribeFleetsInstances) SetInstanceType(v string) *DescribeFleetsInstances { + s.InstanceType = &v + return s +} + +// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. +func (s *DescribeFleetsInstances) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *DescribeFleetsInstances { + s.LaunchTemplateAndOverrides = v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *DescribeFleetsInstances) SetLifecycle(v string) *DescribeFleetsInstances { + s.Lifecycle = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *DescribeFleetsInstances) SetPlatform(v string) *DescribeFleetsInstances { + s.Platform = &v + return s +} + type DescribeFleetsOutput struct { _ struct{} `type:"structure"` @@ -36307,7 +41501,6 @@ func (s *DescribeIamInstanceProfileAssociationsOutput) SetNextToken(v string) *D return s } -// Contains the parameters for DescribeIdFormat. type DescribeIdFormatInput struct { _ struct{} `type:"structure"` @@ -36337,7 +41530,6 @@ func (s *DescribeIdFormatInput) SetResource(v string) *DescribeIdFormatInput { return s } -// Contains the output of DescribeIdFormat. type DescribeIdFormatOutput struct { _ struct{} `type:"structure"` @@ -36361,7 +41553,6 @@ func (s *DescribeIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIdFormatOut return s } -// Contains the parameters for DescribeIdentityIdFormat. type DescribeIdentityIdFormatInput struct { _ struct{} `type:"structure"` @@ -36416,7 +41607,6 @@ func (s *DescribeIdentityIdFormatInput) SetResource(v string) *DescribeIdentityI return s } -// Contains the output of DescribeIdentityIdFormat. type DescribeIdentityIdFormatOutput struct { _ struct{} `type:"structure"` @@ -36965,7 +42155,6 @@ func (s *DescribeImportSnapshotTasksOutput) SetNextToken(v string) *DescribeImpo return s } -// Contains the parameters for DescribeInstanceAttribute. type DescribeInstanceAttributeInput struct { _ struct{} `type:"structure"` @@ -37291,7 +42480,6 @@ func (s *DescribeInstanceCreditSpecificationsOutput) SetNextToken(v string) *Des return s } -// Contains the parameters for DescribeInstanceStatus. type DescribeInstanceStatusInput struct { _ struct{} `type:"structure"` @@ -37407,7 +42595,6 @@ func (s *DescribeInstanceStatusInput) SetNextToken(v string) *DescribeInstanceSt return s } -// Contains the output of DescribeInstanceStatus. type DescribeInstanceStatusOutput struct { _ struct{} `type:"structure"` @@ -37441,7 +42628,6 @@ func (s *DescribeInstanceStatusOutput) SetNextToken(v string) *DescribeInstanceS return s } -// Contains the parameters for DescribeInstances. type DescribeInstancesInput struct { _ struct{} `type:"structure"` @@ -37485,6 +42671,10 @@ type DescribeInstancesInput struct { // * 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. // @@ -37741,7 +42931,6 @@ func (s *DescribeInstancesInput) SetNextToken(v string) *DescribeInstancesInput return s } -// Contains the output of DescribeInstances. type DescribeInstancesOutput struct { _ struct{} `type:"structure"` @@ -37793,6 +42982,8 @@ type DescribeInternetGatewaysInput struct { // // * 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 @@ -38134,7 +43325,7 @@ type DescribeLaunchTemplatesInput struct { // 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. + // value can be between 1 and 200. MaxResults *int64 `type:"integer"` // The token to request the next page of results. @@ -38220,7 +43411,6 @@ func (s *DescribeLaunchTemplatesOutput) SetNextToken(v string) *DescribeLaunchTe return s } -// Contains the parameters for DescribeMovingAddresses. type DescribeMovingAddressesInput struct { _ struct{} `type:"structure"` @@ -38244,7 +43434,7 @@ type DescribeMovingAddressesInput struct { // 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. + // The token for the next page of results. NextToken *string `locationName:"nextToken" type:"string"` // One or more Elastic IP addresses. @@ -38291,7 +43481,6 @@ func (s *DescribeMovingAddressesInput) SetPublicIps(v []*string) *DescribeMoving return s } -// Contains the output of DescribeMovingAddresses. type DescribeMovingAddressesOutput struct { _ struct{} `type:"structure"` @@ -38477,6 +43666,8 @@ type DescribeNetworkAclsInput struct { // // * 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 @@ -38971,7 +44162,6 @@ func (s *DescribeNetworkInterfacesOutput) SetNextToken(v string) *DescribeNetwor return s } -// Contains the parameters for DescribePlacementGroups. type DescribePlacementGroupsInput struct { _ struct{} `type:"structure"` @@ -39025,7 +44215,6 @@ func (s *DescribePlacementGroupsInput) SetGroupNames(v []*string) *DescribePlace return s } -// Contains the output of DescribePlacementGroups. type DescribePlacementGroupsOutput struct { _ struct{} `type:"structure"` @@ -39247,7 +44436,97 @@ func (s *DescribePrincipalIdFormatOutput) SetPrincipals(v []*PrincipalIdFormat) return s } -// Contains the parameters for DescribeRegions. +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"` @@ -39296,7 +44575,6 @@ func (s *DescribeRegionsInput) SetRegionNames(v []*string) *DescribeRegionsInput return s } -// Contains the output of DescribeRegions. type DescribeRegionsOutput struct { _ struct{} `type:"structure"` @@ -39907,6 +45185,8 @@ type DescribeRouteTablesInput struct { // 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 @@ -39928,6 +45208,8 @@ type DescribeRouteTablesInput struct { // // * 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 @@ -39952,6 +45234,8 @@ type DescribeRouteTablesInput struct { // 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"` @@ -41732,18 +47016,21 @@ type DescribeSubnetsInput struct { // One or more filters. // - // * availabilityZone - The Availability Zone for the subnet. You can also - // use availability-zone as the filter name. + // * 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. // - // * cidrBlock - The IPv4 CIDR block of the subnet. The CIDR block you specify + // * 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 cidr-block as the filter names. + // for the subnet. You can also use cidr or cidrBlock 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. + // * 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. @@ -41754,8 +47041,12 @@ type DescribeSubnetsInput struct { // * 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. @@ -41932,6 +47223,510 @@ func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput { 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-id - The ID of the association. + // + // * association-route-table-id - The ID of the route table for the transit + // gateway. + // + // * associate-state - The state of the association (associating | associated + // | disassociating). + // + // * resource-id - The ID of 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). + // + // * transit-gateway-id - The ID of the transit gateway. + // + // * transit-gateway-route-table-id - The ID of the transit gateway route + // table. + // + // * transit-gateway-route-table-state - The state (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 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: + // + // * transit-gateway-attachment-id - The ID of the attachment. + // + // * transit-gateway-attachment-state - The state of the attachment (pendingAcceptance + // | pending | available | modifying | deleting | deleted | failed | rejected). + // + // * 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: + // + // * amazon-side-asn - The private ASN for the Amazon side of a BGP session. + // + // * association-default-route-table-id - The ID of the default association + // route table. + // + // * default-route-table-association - Indicates whether resource attachments + // are automatically associated with the default association route table + // (enable | disable). + // + // * default-route-table-propagation - Indicates whether resource attachments + // automatically propagate routes to the default propagation route table + // (enable | disable). + // + // * owner-account-id - The ID of the AWS account that owns the transit gateway. + // + // * propagation-default-route-table-id - The ID of the default propagation + // route table. + // + // * 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"` @@ -43507,6 +49302,8 @@ type DescribeVpcsInput struct { // // * 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. @@ -44232,6 +50029,9 @@ type DhcpOptions struct { // 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"` } @@ -44258,12 +50058,105 @@ func (s *DhcpOptions) SetDhcpOptionsId(v string) *DhcpOptions { 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 } +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"` @@ -44450,7 +50343,6 @@ func (s *DisableVpcClassicLinkOutput) SetReturn(v bool) *DisableVpcClassicLinkOu return s } -// Contains the parameters for DisassociateAddress. type DisassociateAddressInput struct { _ struct{} `type:"structure"` @@ -44705,6 +50597,93 @@ func (s *DisassociateSubnetCidrBlockOutput) SetSubnetId(v string) *DisassociateS 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. + // + // 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 DisassociateTransitGatewayRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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 *DisassociateTransitGatewayRouteTableInput) SetDryRun(v bool) *DisassociateTransitGatewayRouteTableInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *DisassociateTransitGatewayRouteTableInput) SetTransitGatewayAttachmentId(v string) *DisassociateTransitGatewayRouteTableInput { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *DisassociateTransitGatewayRouteTableInput) SetTransitGatewayRouteTableId(v string) *DisassociateTransitGatewayRouteTableInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type DisassociateTransitGatewayRouteTableOutput struct { + _ struct{} `type:"structure"` + + // Information about the association. + Association *TransitGatewayAssociation `locationName:"association" type:"structure"` +} + +// String returns the string representation +func (s DisassociateTransitGatewayRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateTransitGatewayRouteTableOutput) GoString() string { + return s.String() +} + +// SetAssociation sets the Association field's value. +func (s *DisassociateTransitGatewayRouteTableOutput) SetAssociation(v *TransitGatewayAssociation) *DisassociateTransitGatewayRouteTableOutput { + s.Association = v + return s +} + type DisassociateVpcCidrBlockInput struct { _ struct{} `type:"structure"` @@ -45070,8 +51049,12 @@ type EbsBlockDevice struct { // 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. + // Constraints: Range is 100-10,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. @@ -45277,20 +51260,21 @@ func (s *EgressOnlyInternetGateway) SetEgressOnlyInternetGatewayId(v string) *Eg return s } -// Describes the association between an instance and an Elastic GPU. +// Describes the association between an instance and an Elastic Graphics accelerator. type ElasticGpuAssociation 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. + // The state of the association between the instance and the Elastic Graphics + // accelerator. ElasticGpuAssociationState *string `locationName:"elasticGpuAssociationState" type:"string"` - // The time the Elastic GPU was associated with the instance. + // The time the Elastic Graphics accelerator was associated with the instance. ElasticGpuAssociationTime *string `locationName:"elasticGpuAssociationTime" type:"string"` - // The ID of the Elastic GPU. + // The ID of the Elastic Graphics accelerator. ElasticGpuId *string `locationName:"elasticGpuId" type:"string"` } @@ -45328,7 +51312,7 @@ func (s *ElasticGpuAssociation) SetElasticGpuId(v string) *ElasticGpuAssociation return s } -// Describes the status of an Elastic GPU. +// Describes the status of an Elastic Graphics accelerator. type ElasticGpuHealth struct { _ struct{} `type:"structure"` @@ -45352,11 +51336,11 @@ func (s *ElasticGpuHealth) SetStatus(v string) *ElasticGpuHealth { return s } -// A specification for an Elastic GPU. +// A specification for an Elastic Graphics accelerator. type ElasticGpuSpecification struct { _ struct{} `type:"structure"` - // The type of Elastic GPU. + // The type of Elastic Graphics accelerator. // // Type is a required field Type *string `type:"string" required:"true"` @@ -45415,26 +51399,26 @@ func (s *ElasticGpuSpecificationResponse) SetType(v string) *ElasticGpuSpecifica return s } -// Describes an Elastic GPU. +// Describes an Elastic Graphics accelerator. type ElasticGpus struct { _ struct{} `type:"structure"` - // The Availability Zone in the which the Elastic GPU resides. + // The Availability Zone in the which the Elastic Graphics accelerator resides. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The status of the Elastic GPU. + // The status of the Elastic Graphics accelerator. ElasticGpuHealth *ElasticGpuHealth `locationName:"elasticGpuHealth" type:"structure"` - // The ID of the Elastic GPU. + // The ID of the Elastic Graphics accelerator. ElasticGpuId *string `locationName:"elasticGpuId" type:"string"` - // The state of the Elastic GPU. + // The state of the Elastic Graphics accelerator. ElasticGpuState *string `locationName:"elasticGpuState" type:"string" enum:"ElasticGpuState"` - // The type of Elastic GPU. + // The type of Elastic Graphics accelerator. ElasticGpuType *string `locationName:"elasticGpuType" type:"string"` - // The ID of the instance to which the Elastic GPU is attached. + // The ID of the instance to which the Elastic Graphics accelerator is attached. InstanceId *string `locationName:"instanceId" type:"string"` } @@ -45484,6 +51468,185 @@ func (s *ElasticGpus) SetInstanceId(v string) *ElasticGpus { return s } +// Describes an elastic inference accelerator. +type ElasticInferenceAccelerator struct { + _ struct{} `type:"structure"` + + // 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 ElasticInferenceAccelerator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticInferenceAccelerator) GoString() string { + return s.String() +} + +// 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 +} + +// SetType sets the Type field's value. +func (s *ElasticInferenceAccelerator) SetType(v string) *ElasticInferenceAccelerator { + s.Type = &v + return s +} + +// Describes the association between an instance and an elastic inference accelerator. +type ElasticInferenceAcceleratorAssociation struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the elastic inference accelerator. + ElasticInferenceAcceleratorArn *string `locationName:"elasticInferenceAcceleratorArn" type:"string"` + + // 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 ElasticInferenceAcceleratorAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticInferenceAcceleratorAssociation) GoString() string { + return s.String() +} + +// SetElasticInferenceAcceleratorArn sets the ElasticInferenceAcceleratorArn field's value. +func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorArn(v string) *ElasticInferenceAcceleratorAssociation { + s.ElasticInferenceAcceleratorArn = &v + return s +} + +// SetElasticInferenceAcceleratorAssociationId sets the ElasticInferenceAcceleratorAssociationId field's value. +func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorAssociationId(v string) *ElasticInferenceAcceleratorAssociation { + s.ElasticInferenceAcceleratorAssociationId = &v + return s +} + +// SetElasticInferenceAcceleratorAssociationState sets the ElasticInferenceAcceleratorAssociationState field's value. +func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorAssociationState(v string) *ElasticInferenceAcceleratorAssociation { + s.ElasticInferenceAcceleratorAssociationState = &v + return s +} + +// 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 `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 EnableTransitGatewayRouteTablePropagationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableTransitGatewayRouteTablePropagationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableTransitGatewayRouteTablePropagationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableTransitGatewayRouteTablePropagationInput"} + 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 *EnableTransitGatewayRouteTablePropagationInput) SetDryRun(v bool) *EnableTransitGatewayRouteTablePropagationInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *EnableTransitGatewayRouteTablePropagationInput) SetTransitGatewayAttachmentId(v string) *EnableTransitGatewayRouteTablePropagationInput { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *EnableTransitGatewayRouteTablePropagationInput) SetTransitGatewayRouteTableId(v string) *EnableTransitGatewayRouteTablePropagationInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type EnableTransitGatewayRouteTablePropagationOutput struct { + _ struct{} `type:"structure"` + + // Information about route propagation. + Propagation *TransitGatewayPropagation `locationName:"propagation" type:"structure"` +} + +// String returns the string representation +func (s EnableTransitGatewayRouteTablePropagationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableTransitGatewayRouteTablePropagationOutput) GoString() string { + return s.String() +} + +// SetPropagation sets the Propagation field's value. +func (s *EnableTransitGatewayRouteTablePropagationOutput) SetPropagation(v *TransitGatewayPropagation) *EnableTransitGatewayRouteTablePropagationOutput { + s.Propagation = v + return s +} + // Contains the parameters for EnableVgwRoutePropagation. type EnableVgwRoutePropagationInput struct { _ struct{} `type:"structure"` @@ -46014,6 +52177,113 @@ func (s *ExportToS3TaskSpecification) SetS3Prefix(v string) *ExportToS3TaskSpeci return s } +type ExportTransitGatewayRoutesInput 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: + // + // * transit-gateway-route-destination-cidr-block - The CIDR range. + // + // * 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). + // + // * transit-gateway-route-vpn-connection-id - The ID of the VPN connection. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The name of the S3 bucket. + // + // S3Bucket is a required field + S3Bucket *string `type:"string" required:"true"` + + // The ID of the route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ExportTransitGatewayRoutesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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 *ExportTransitGatewayRoutesInput) SetDryRun(v bool) *ExportTransitGatewayRoutesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *ExportTransitGatewayRoutesInput) SetFilters(v []*Filter) *ExportTransitGatewayRoutesInput { + s.Filters = v + return s +} + +// SetS3Bucket sets the S3Bucket field's value. +func (s *ExportTransitGatewayRoutesInput) SetS3Bucket(v string) *ExportTransitGatewayRoutesInput { + s.S3Bucket = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *ExportTransitGatewayRoutesInput) SetTransitGatewayRouteTableId(v string) *ExportTransitGatewayRoutesInput { + s.TransitGatewayRouteTableId = &v + return s +} + +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 +} + // 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 @@ -46091,6 +52361,10 @@ type FleetData struct { // 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"` @@ -46109,6 +52383,10 @@ type FleetData struct { // 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"` @@ -46183,6 +52461,12 @@ func (s *FleetData) SetCreateTime(v time.Time) *FleetData { return s } +// SetErrors sets the Errors field's value. +func (s *FleetData) SetErrors(v []*DescribeFleetError) *FleetData { + s.Errors = v + return s +} + // SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. func (s *FleetData) SetExcessCapacityTerminationPolicy(v string) *FleetData { s.ExcessCapacityTerminationPolicy = &v @@ -46213,6 +52497,12 @@ func (s *FleetData) SetFulfilledOnDemandCapacity(v float64) *FleetData { return s } +// SetInstances sets the Instances field's value. +func (s *FleetData) SetInstances(v []*DescribeFleetsInstances) *FleetData { + s.Instances = v + return s +} + // SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. func (s *FleetData) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfig) *FleetData { s.LaunchTemplateConfigs = v @@ -46370,6 +52660,9 @@ type FleetLaunchTemplateOverrides struct { // The maximum price per unit hour that you are willing to pay for a Spot Instance. MaxPrice *string `locationName:"maxPrice" type:"string"` + // 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 @@ -46413,6 +52706,12 @@ func (s *FleetLaunchTemplateOverrides) SetMaxPrice(v string) *FleetLaunchTemplat return s } +// SetPlacement sets the Placement field's value. +func (s *FleetLaunchTemplateOverrides) SetPlacement(v *PlacementResponse) *FleetLaunchTemplateOverrides { + s.Placement = v + return s +} + // SetPriority sets the Priority field's value. func (s *FleetLaunchTemplateOverrides) SetPriority(v float64) *FleetLaunchTemplateOverrides { s.Priority = &v @@ -46444,6 +52743,9 @@ type FleetLaunchTemplateOverridesRequest struct { // 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 @@ -46487,6 +52789,12 @@ func (s *FleetLaunchTemplateOverridesRequest) SetMaxPrice(v string) *FleetLaunch return s } +// SetPlacement sets the Placement field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetPlacement(v *Placement) *FleetLaunchTemplateOverridesRequest { + s.Placement = v + return s +} + // SetPriority sets the Priority field's value. func (s *FleetLaunchTemplateOverridesRequest) SetPriority(v float64) *FleetLaunchTemplateOverridesRequest { s.Priority = &v @@ -46986,7 +53294,6 @@ func (s *FpgaImageState) SetMessage(v string) *FpgaImageState { return s } -// Contains the parameters for GetConsoleOutput. type GetConsoleOutputInput struct { _ struct{} `type:"structure"` @@ -47048,7 +53355,6 @@ func (s *GetConsoleOutputInput) SetLatest(v bool) *GetConsoleOutputInput { return s } -// Contains the output of GetConsoleOutput. type GetConsoleOutputOutput struct { _ struct{} `type:"structure"` @@ -47091,7 +53397,6 @@ func (s *GetConsoleOutputOutput) SetTimestamp(v time.Time) *GetConsoleOutputOutp return s } -// Contains the parameters for the request. type GetConsoleScreenshotInput struct { _ struct{} `type:"structure"` @@ -47152,7 +53457,6 @@ func (s *GetConsoleScreenshotInput) SetWakeUp(v bool) *GetConsoleScreenshotInput return s } -// Contains the output of the request. type GetConsoleScreenshotOutput struct { _ struct{} `type:"structure"` @@ -47362,7 +53666,6 @@ func (s *GetLaunchTemplateDataOutput) SetLaunchTemplateData(v *ResponseLaunchTem return s } -// Contains the parameters for GetPasswordData. type GetPasswordDataInput struct { _ struct{} `type:"structure"` @@ -47413,7 +53716,6 @@ func (s *GetPasswordDataInput) SetInstanceId(v string) *GetPasswordDataInput { return s } -// Contains the output of GetPasswordData. type GetPasswordDataOutput struct { _ struct{} `type:"structure"` @@ -47623,6 +53925,365 @@ func (s *GetReservedInstancesExchangeQuoteOutput) SetValidationFailureReason(v s return s } +type GetTransitGatewayAttachmentPropagationsInput 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: + // + // * 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 ID of the attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetTransitGatewayAttachmentPropagationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTransitGatewayAttachmentPropagationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetDryRun(v bool) *GetTransitGatewayAttachmentPropagationsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetFilters(v []*Filter) *GetTransitGatewayAttachmentPropagationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetMaxResults(v int64) *GetTransitGatewayAttachmentPropagationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetNextToken(v string) *GetTransitGatewayAttachmentPropagationsInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetTransitGatewayAttachmentId(v string) *GetTransitGatewayAttachmentPropagationsInput { + s.TransitGatewayAttachmentId = &v + return s +} + +type GetTransitGatewayAttachmentPropagationsOutput 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 propagation route tables. + TransitGatewayAttachmentPropagations []*TransitGatewayAttachmentPropagation `locationName:"transitGatewayAttachmentPropagations" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s GetTransitGatewayAttachmentPropagationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTransitGatewayAttachmentPropagationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayAttachmentPropagationsOutput) SetNextToken(v string) *GetTransitGatewayAttachmentPropagationsOutput { + s.NextToken = &v + return s +} + +// SetTransitGatewayAttachmentPropagations sets the TransitGatewayAttachmentPropagations field's value. +func (s *GetTransitGatewayAttachmentPropagationsOutput) SetTransitGatewayAttachmentPropagations(v []*TransitGatewayAttachmentPropagation) *GetTransitGatewayAttachmentPropagationsOutput { + s.TransitGatewayAttachmentPropagations = v + return s +} + +type GetTransitGatewayRouteTableAssociationsInput 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-id - The ID of the association. + // + // * 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 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 transit gateway route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetTransitGatewayRouteTableAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTransitGatewayRouteTableAssociationsInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetFilters sets the Filters field's value. +func (s *GetTransitGatewayRouteTableAssociationsInput) SetFilters(v []*Filter) *GetTransitGatewayRouteTableAssociationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetTransitGatewayRouteTableAssociationsInput) SetMaxResults(v int64) *GetTransitGatewayRouteTableAssociationsInput { + s.MaxResults = &v + return s +} + +// 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 +} + +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) +} + +// 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 +} + +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRouteTableAssociationsOutput) SetNextToken(v string) *GetTransitGatewayRouteTableAssociationsOutput { + s.NextToken = &v + return s +} + +type GetTransitGatewayRouteTablePropagationsInput 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: + // + // * 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 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 transit gateway route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetTransitGatewayRouteTablePropagationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTransitGatewayRouteTablePropagationsInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetFilters sets the Filters field's value. +func (s *GetTransitGatewayRouteTablePropagationsInput) SetFilters(v []*Filter) *GetTransitGatewayRouteTablePropagationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetTransitGatewayRouteTablePropagationsInput) SetMaxResults(v int64) *GetTransitGatewayRouteTablePropagationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRouteTablePropagationsInput) SetNextToken(v string) *GetTransitGatewayRouteTablePropagationsInput { + s.NextToken = &v + return s +} + +// 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"` + + // 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 route table propagations. + TransitGatewayRouteTablePropagations []*TransitGatewayRouteTablePropagation `locationName:"transitGatewayRouteTablePropagations" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s GetTransitGatewayRouteTablePropagationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTransitGatewayRouteTablePropagationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRouteTablePropagationsOutput) SetNextToken(v string) *GetTransitGatewayRouteTablePropagationsOutput { + s.NextToken = &v + return s +} + +// SetTransitGatewayRouteTablePropagations sets the TransitGatewayRouteTablePropagations field's value. +func (s *GetTransitGatewayRouteTablePropagationsOutput) SetTransitGatewayRouteTablePropagations(v []*TransitGatewayRouteTablePropagation) *GetTransitGatewayRouteTablePropagationsOutput { + s.TransitGatewayRouteTablePropagations = v + return s +} + // Describes a security group. type GroupIdentifier struct { _ struct{} `type:"structure"` @@ -47656,6 +54317,65 @@ func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier { return s } +// 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"` + + // 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 HibernationOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HibernationOptions) GoString() string { + return s.String() +} + +// SetConfigured sets the Configured field's value. +func (s *HibernationOptions) SetConfigured(v bool) *HibernationOptions { + s.Configured = &v + return s +} + +// 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"` + + // 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 HibernationOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HibernationOptionsRequest) GoString() string { + return s.String() +} + +// SetConfigured sets the Configured field's value. +func (s *HibernationOptionsRequest) SetConfigured(v bool) *HibernationOptionsRequest { + s.Configured = &v + return s +} + // Describes an event in the history of the Spot Fleet request. type HistoryRecord struct { _ struct{} `type:"structure"` @@ -48721,11 +55441,46 @@ type ImportImageInput struct { // 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 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 @@ -48791,12 +55546,24 @@ func (s *ImportImageInput) SetDryRun(v bool) *ImportImageInput { return s } +// SetEncrypted sets the Encrypted field's value. +func (s *ImportImageInput) SetEncrypted(v bool) *ImportImageInput { + s.Encrypted = &v + return s +} + // SetHypervisor sets the Hypervisor field's value. func (s *ImportImageInput) SetHypervisor(v string) *ImportImageInput { s.Hypervisor = &v return s } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ImportImageInput) SetKmsKeyId(v string) *ImportImageInput { + s.KmsKeyId = &v + return s +} + // SetLicenseType sets the LicenseType field's value. func (s *ImportImageInput) SetLicenseType(v string) *ImportImageInput { s.LicenseType = &v @@ -48825,6 +55592,9 @@ type ImportImageOutput struct { // A description of the import task. Description *string `locationName:"description" type:"string"` + // Indicates whether the AMI is encypted. + Encrypted *bool `locationName:"encrypted" type:"boolean"` + // The target hypervisor of the import task. Hypervisor *string `locationName:"hypervisor" type:"string"` @@ -48834,6 +55604,10 @@ type ImportImageOutput struct { // The task ID of the import image task. ImportTaskId *string `locationName:"importTaskId" 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"` + // The license type of the virtual machine. LicenseType *string `locationName:"licenseType" type:"string"` @@ -48875,6 +55649,12 @@ func (s *ImportImageOutput) SetDescription(v string) *ImportImageOutput { return s } +// SetEncrypted sets the Encrypted field's value. +func (s *ImportImageOutput) SetEncrypted(v bool) *ImportImageOutput { + s.Encrypted = &v + return s +} + // SetHypervisor sets the Hypervisor field's value. func (s *ImportImageOutput) SetHypervisor(v string) *ImportImageOutput { s.Hypervisor = &v @@ -48893,6 +55673,12 @@ func (s *ImportImageOutput) SetImportTaskId(v string) *ImportImageOutput { return s } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ImportImageOutput) SetKmsKeyId(v string) *ImportImageOutput { + s.KmsKeyId = &v + return s +} + // SetLicenseType sets the LicenseType field's value. func (s *ImportImageOutput) SetLicenseType(v string) *ImportImageOutput { s.LicenseType = &v @@ -48941,6 +55727,9 @@ type ImportImageTask struct { // A description of the import task. Description *string `locationName:"description" type:"string"` + // Indicates whether the image is encrypted. + Encrypted *bool `locationName:"encrypted" type:"boolean"` + // The target hypervisor for the import task. // // Valid values: xen @@ -48952,6 +55741,10 @@ type ImportImageTask struct { // The ID of the import image task. ImportTaskId *string `locationName:"importTaskId" type:"string"` + // 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 license type of the virtual machine. LicenseType *string `locationName:"licenseType" type:"string"` @@ -48993,6 +55786,12 @@ func (s *ImportImageTask) SetDescription(v string) *ImportImageTask { return s } +// SetEncrypted sets the Encrypted field's value. +func (s *ImportImageTask) SetEncrypted(v bool) *ImportImageTask { + s.Encrypted = &v + return s +} + // SetHypervisor sets the Hypervisor field's value. func (s *ImportImageTask) SetHypervisor(v string) *ImportImageTask { s.Hypervisor = &v @@ -49011,6 +55810,12 @@ func (s *ImportImageTask) SetImportTaskId(v string) *ImportImageTask { return s } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ImportImageTask) SetKmsKeyId(v string) *ImportImageTask { + s.KmsKeyId = &v + return s +} + // SetLicenseType sets the LicenseType field's value. func (s *ImportImageTask) SetLicenseType(v string) *ImportImageTask { s.LicenseType = &v @@ -49332,35 +56137,25 @@ type ImportInstanceVolumeDetailItem 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"` + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The number of bytes converted so far. - // - // BytesConverted is a required field - BytesConverted *int64 `locationName:"bytesConverted" type:"long" required:"true"` + BytesConverted *int64 `locationName:"bytesConverted" type:"long"` // 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"` + Image *DiskImageDescription `locationName:"image" type:"structure"` // The status of the import of this particular disk image. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true"` + 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 is a required field - Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure" required:"true"` + Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure"` } // String returns the string representation @@ -49536,6 +56331,42 @@ type ImportSnapshotInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` + // 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. + // + // 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"` } @@ -49580,6 +56411,18 @@ func (s *ImportSnapshotInput) SetDryRun(v bool) *ImportSnapshotInput { return s } +// SetEncrypted sets the Encrypted field's value. +func (s *ImportSnapshotInput) SetEncrypted(v bool) *ImportSnapshotInput { + s.Encrypted = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ImportSnapshotInput) SetKmsKeyId(v string) *ImportSnapshotInput { + s.KmsKeyId = &v + return s +} + // SetRoleName sets the RoleName field's value. func (s *ImportSnapshotInput) SetRoleName(v string) *ImportSnapshotInput { s.RoleName = &v @@ -49866,6 +56709,12 @@ type Instance struct { // Any block device mapping entries for the instance. BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + // The ID of the Capacity Reservation. + CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` + + // Information about the Capacity Reservation targeting option. + CapacityReservationSpecification *CapacityReservationSpecificationResponse `locationName:"capacityReservationSpecification" type:"structure"` + // The idempotency token you provided when you launched the instance, if applicable. ClientToken *string `locationName:"clientToken" type:"string"` @@ -49882,9 +56731,15 @@ type Instance struct { // The Elastic GPU associated with the instance. ElasticGpuAssociations []*ElasticGpuAssociation `locationName:"elasticGpuAssociationSet" locationNameList:"item" type:"list"` + // The elastic inference accelerator associated with the instance. + ElasticInferenceAcceleratorAssociations []*ElasticInferenceAcceleratorAssociation `locationName:"elasticInferenceAcceleratorAssociationSet" locationNameList:"item" type:"list"` + // Specifies whether enhanced networking with ENA is enabled. EnaSupport *bool `locationName:"enaSupport" type:"boolean"` + // Indicates whether the instance is enabled for hibernation. + HibernationOptions *HibernationOptions `locationName:"hibernationOptions" type:"structure"` + // The hypervisor type of the instance. Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` @@ -49913,6 +56768,9 @@ type Instance struct { // The time the instance was launched. LaunchTime *time.Time `locationName:"launchTime" type:"timestamp"` + // The license configurations. + Licenses []*LicenseConfiguration `locationName:"licenseSet" locationNameList:"item" type:"list"` + // The monitoring for the instance. Monitoring *Monitoring `locationName:"monitoring" type:"structure"` @@ -50027,6 +56885,18 @@ func (s *Instance) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *Inst return s } +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *Instance) SetCapacityReservationId(v string) *Instance { + s.CapacityReservationId = &v + return s +} + +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *Instance) SetCapacityReservationSpecification(v *CapacityReservationSpecificationResponse) *Instance { + s.CapacityReservationSpecification = v + return s +} + // SetClientToken sets the ClientToken field's value. func (s *Instance) SetClientToken(v string) *Instance { s.ClientToken = &v @@ -50051,12 +56921,24 @@ func (s *Instance) SetElasticGpuAssociations(v []*ElasticGpuAssociation) *Instan return s } +// SetElasticInferenceAcceleratorAssociations sets the ElasticInferenceAcceleratorAssociations field's value. +func (s *Instance) SetElasticInferenceAcceleratorAssociations(v []*ElasticInferenceAcceleratorAssociation) *Instance { + s.ElasticInferenceAcceleratorAssociations = v + return s +} + // SetEnaSupport sets the EnaSupport field's value. func (s *Instance) SetEnaSupport(v bool) *Instance { s.EnaSupport = &v return s } +// SetHibernationOptions sets the HibernationOptions field's value. +func (s *Instance) SetHibernationOptions(v *HibernationOptions) *Instance { + s.HibernationOptions = v + return s +} + // SetHypervisor sets the Hypervisor field's value. func (s *Instance) SetHypervisor(v string) *Instance { s.Hypervisor = &v @@ -50111,6 +56993,12 @@ func (s *Instance) SetLaunchTime(v time.Time) *Instance { return s } +// SetLicenses sets the Licenses field's value. +func (s *Instance) SetLicenses(v []*LicenseConfiguration) *Instance { + s.Licenses = v + return s +} + // SetMonitoring sets the Monitoring field's value. func (s *Instance) SetMonitoring(v *Monitoring) *Instance { s.Monitoring = v @@ -51381,6 +58269,9 @@ type InternetGateway struct { // The ID of the internet gateway. InternetGatewayId *string `locationName:"internetGatewayId" type:"string"` + // 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"` } @@ -51407,6 +58298,12 @@ func (s *InternetGateway) SetInternetGatewayId(v string) *InternetGateway { return s } +// SetOwnerId sets the OwnerId field's value. +func (s *InternetGateway) SetOwnerId(v string) *InternetGateway { + s.OwnerId = &v + return s +} + // SetTags sets the Tags field's value. func (s *InternetGateway) SetTags(v []*Tag) *InternetGateway { s.Tags = v @@ -51979,6 +58876,40 @@ func (s *LaunchTemplate) SetTags(v []*Tag) *LaunchTemplate { return s } +// Describes a launch template and overrides. +type LaunchTemplateAndOverridesResponse struct { + _ struct{} `type:"structure"` + + // The launch template. + LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" 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 LaunchTemplateAndOverridesResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateAndOverridesResponse) GoString() string { + return s.String() +} + +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *LaunchTemplateAndOverridesResponse) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *LaunchTemplateAndOverridesResponse { + s.LaunchTemplateSpecification = v + return s +} + +// SetOverrides sets the Overrides field's value. +func (s *LaunchTemplateAndOverridesResponse) SetOverrides(v *FleetLaunchTemplateOverrides) *LaunchTemplateAndOverridesResponse { + s.Overrides = v + return s +} + // Describes a block device mapping. type LaunchTemplateBlockDeviceMapping struct { _ struct{} `type:"structure"` @@ -52088,6 +59019,91 @@ func (s *LaunchTemplateBlockDeviceMappingRequest) SetVirtualName(v string) *Laun 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"` + + // 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"` + + // Information about the target Capacity Reservation. + CapacityReservationTarget *CapacityReservationTarget `type:"structure"` +} + +// String returns the string representation +func (s LaunchTemplateCapacityReservationSpecificationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateCapacityReservationSpecificationRequest) GoString() string { + return s.String() +} + +// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. +func (s *LaunchTemplateCapacityReservationSpecificationRequest) SetCapacityReservationPreference(v string) *LaunchTemplateCapacityReservationSpecificationRequest { + s.CapacityReservationPreference = &v + return s +} + +// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. +func (s *LaunchTemplateCapacityReservationSpecificationRequest) SetCapacityReservationTarget(v *CapacityReservationTarget) *LaunchTemplateCapacityReservationSpecificationRequest { + s.CapacityReservationTarget = v + return s +} + +// Information about the Capacity Reservation targeting option. +type LaunchTemplateCapacityReservationSpecificationResponse 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 in On-Demand capacity. + CapacityReservationPreference *string `locationName:"capacityReservationPreference" type:"string" enum:"CapacityReservationPreference"` + + // Information about the target Capacity Reservation. + CapacityReservationTarget *CapacityReservationTargetResponse `locationName:"capacityReservationTarget" type:"structure"` +} + +// String returns the string representation +func (s LaunchTemplateCapacityReservationSpecificationResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateCapacityReservationSpecificationResponse) GoString() string { + return s.String() +} + +// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. +func (s *LaunchTemplateCapacityReservationSpecificationResponse) SetCapacityReservationPreference(v string) *LaunchTemplateCapacityReservationSpecificationResponse { + s.CapacityReservationPreference = &v + return s +} + +// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. +func (s *LaunchTemplateCapacityReservationSpecificationResponse) SetCapacityReservationTarget(v *CapacityReservationTargetResponse) *LaunchTemplateCapacityReservationSpecificationResponse { + s.CapacityReservationTarget = v + return s +} + // Describes a launch template and overrides. type LaunchTemplateConfig struct { _ struct{} `type:"structure"` @@ -52376,6 +59392,124 @@ func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeType(v string) *LaunchTem return s } +// Describes an elastic inference accelerator. +type LaunchTemplateElasticInferenceAccelerator struct { + _ struct{} `type:"structure"` + + // 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 LaunchTemplateElasticInferenceAccelerator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateElasticInferenceAccelerator) GoString() string { + return s.String() +} + +// 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")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetType sets the Type field's value. +func (s *LaunchTemplateElasticInferenceAccelerator) SetType(v string) *LaunchTemplateElasticInferenceAccelerator { + s.Type = &v + return s +} + +// Describes an elastic inference accelerator. +type LaunchTemplateElasticInferenceAcceleratorResponse struct { + _ struct{} `type:"structure"` + + // 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 LaunchTemplateElasticInferenceAcceleratorResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateElasticInferenceAcceleratorResponse) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *LaunchTemplateElasticInferenceAcceleratorResponse) SetType(v string) *LaunchTemplateElasticInferenceAcceleratorResponse { + s.Type = &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"` +} + +// String returns the string representation +func (s LaunchTemplateHibernationOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateHibernationOptions) GoString() string { + return s.String() +} + +// SetConfigured sets the Configured field's value. +func (s *LaunchTemplateHibernationOptions) SetConfigured(v bool) *LaunchTemplateHibernationOptions { + s.Configured = &v + return s +} + +// 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"` + + // 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 LaunchTemplateHibernationOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateHibernationOptionsRequest) GoString() string { + return s.String() +} + +// SetConfigured sets the Configured field's value. +func (s *LaunchTemplateHibernationOptionsRequest) SetConfigured(v bool) *LaunchTemplateHibernationOptionsRequest { + s.Configured = &v + return s +} + // Describes an IAM instance profile. type LaunchTemplateIamInstanceProfileSpecification struct { _ struct{} `type:"structure"` @@ -52758,6 +59892,54 @@ func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSubnetId return s } +// Describes a license configuration. +type LaunchTemplateLicenseConfiguration struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the license configuration. + LicenseConfigurationArn *string `locationName:"licenseConfigurationArn" type:"string"` +} + +// String returns the string representation +func (s LaunchTemplateLicenseConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateLicenseConfiguration) GoString() string { + return s.String() +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LaunchTemplateLicenseConfiguration) SetLicenseConfigurationArn(v string) *LaunchTemplateLicenseConfiguration { + s.LicenseConfigurationArn = &v + return s +} + +// Describes a license configuration. +type LaunchTemplateLicenseConfigurationRequest struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the license configuration. + LicenseConfigurationArn *string `type:"string"` +} + +// String returns the string representation +func (s LaunchTemplateLicenseConfigurationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateLicenseConfigurationRequest) GoString() string { + return s.String() +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LaunchTemplateLicenseConfigurationRequest) SetLicenseConfigurationArn(v string) *LaunchTemplateLicenseConfigurationRequest { + s.LicenseConfigurationArn = &v + return s +} + // Describes overrides for a launch template. type LaunchTemplateOverrides struct { _ struct{} `type:"structure"` @@ -52902,7 +60084,7 @@ func (s *LaunchTemplatePlacement) SetTenancy(v string) *LaunchTemplatePlacement return s } -// The placement for the instance. +// Describes the placement of an instance. type LaunchTemplatePlacementRequest struct { _ struct{} `type:"structure"` @@ -53353,6 +60535,54 @@ func (s *LaunchTemplatesMonitoringRequest) SetEnabled(v bool) *LaunchTemplatesMo return s } +// Describes a license configuration. +type LicenseConfiguration struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the license configuration. + LicenseConfigurationArn *string `locationName:"licenseConfigurationArn" type:"string"` +} + +// String returns the string representation +func (s LicenseConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LicenseConfiguration) GoString() string { + return s.String() +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LicenseConfiguration) SetLicenseConfigurationArn(v string) *LicenseConfiguration { + s.LicenseConfigurationArn = &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"` +} + +// String returns the string representation +func (s LicenseConfigurationRequest) String() string { + return awsutil.Prettify(s) +} + +// 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 the Classic Load Balancers and target groups to attach to a Spot // Fleet request. type LoadBalancersConfig struct { @@ -53506,6 +60736,123 @@ func (s *LoadPermissionRequest) SetUserId(v string) *LoadPermissionRequest { return s } +type ModifyCapacityReservationInput struct { + _ struct{} `type:"structure"` + + // The ID of the Capacity Reservation. + // + // 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"` + + // 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"` + + // 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 number of instances for which to reserve capacity. + InstanceCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s ModifyCapacityReservationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyCapacityReservationInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *ModifyCapacityReservationInput) SetCapacityReservationId(v string) *ModifyCapacityReservationInput { + s.CapacityReservationId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyCapacityReservationInput) SetDryRun(v bool) *ModifyCapacityReservationInput { + s.DryRun = &v + return s +} + +// SetEndDate sets the EndDate field's value. +func (s *ModifyCapacityReservationInput) SetEndDate(v time.Time) *ModifyCapacityReservationInput { + s.EndDate = &v + return s +} + +// SetEndDateType sets the EndDateType field's value. +func (s *ModifyCapacityReservationInput) SetEndDateType(v string) *ModifyCapacityReservationInput { + s.EndDateType = &v + return s +} + +// SetInstanceCount sets the InstanceCount field's value. +func (s *ModifyCapacityReservationInput) SetInstanceCount(v int64) *ModifyCapacityReservationInput { + s.InstanceCount = &v + return s +} + +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 +} + type ModifyFleetInput struct { _ struct{} `type:"structure"` @@ -53843,7 +61190,6 @@ func (s *ModifyHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ModifyHostsO return s } -// Contains the parameters of ModifyIdFormat. type ModifyIdFormatInput struct { _ struct{} `type:"structure"` @@ -53919,7 +61265,6 @@ func (s ModifyIdFormatOutput) GoString() string { return s.String() } -// Contains the parameters of ModifyIdentityIdFormat. type ModifyIdentityIdFormatInput struct { _ struct{} `type:"structure"` @@ -54154,7 +61499,6 @@ func (s ModifyImageAttributeOutput) GoString() string { return s.String() } -// Contains the parameters for ModifyInstanceAttribute. type ModifyInstanceAttributeInput struct { _ struct{} `type:"structure"` @@ -54384,6 +61728,93 @@ func (s ModifyInstanceAttributeOutput) GoString() string { return s.String() } +type ModifyInstanceCapacityReservationAttributesInput struct { + _ struct{} `type:"structure"` + + // Information about the Capacity Reservation targeting option. + // + // CapacityReservationSpecification is a required field + CapacityReservationSpecification *CapacityReservationSpecification `type:"structure" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the instance to be modified. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyInstanceCapacityReservationAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyInstanceCapacityReservationAttributesInput) GoString() string { + return s.String() +} + +// 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")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *ModifyInstanceCapacityReservationAttributesInput) SetCapacityReservationSpecification(v *CapacityReservationSpecification) *ModifyInstanceCapacityReservationAttributesInput { + s.CapacityReservationSpecification = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyInstanceCapacityReservationAttributesInput) SetDryRun(v bool) *ModifyInstanceCapacityReservationAttributesInput { + s.DryRun = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *ModifyInstanceCapacityReservationAttributesInput) SetInstanceId(v string) *ModifyInstanceCapacityReservationAttributesInput { + s.InstanceId = &v + return s +} + +type ModifyInstanceCapacityReservationAttributesOutput 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 ModifyInstanceCapacityReservationAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyInstanceCapacityReservationAttributesOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ModifyInstanceCapacityReservationAttributesOutput) SetReturn(v bool) *ModifyInstanceCapacityReservationAttributesOutput { + s.Return = &v + return s +} + type ModifyInstanceCreditSpecificationInput struct { _ struct{} `type:"structure"` @@ -55151,6 +62582,140 @@ func (s ModifySubnetAttributeOutput) GoString() string { return s.String() } +type ModifyTransitGatewayVpcAttachmentInput struct { + _ struct{} `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 `type:"boolean"` + + // The new VPC attachment options. + Options *ModifyTransitGatewayVpcAttachmentRequestOptions `type:"structure"` + + // The IDs of one or more subnets to remove. + RemoveSubnetIds []*string `locationNameList:"item" type:"list"` + + // The ID of the attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyTransitGatewayVpcAttachmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTransitGatewayVpcAttachmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyTransitGatewayVpcAttachmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyTransitGatewayVpcAttachmentInput"} + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// 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 *ModifyTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *ModifyTransitGatewayVpcAttachmentInput { + s.DryRun = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *ModifyTransitGatewayVpcAttachmentInput) SetOptions(v *ModifyTransitGatewayVpcAttachmentRequestOptions) *ModifyTransitGatewayVpcAttachmentInput { + s.Options = v + return s +} + +// SetRemoveSubnetIds sets the RemoveSubnetIds field's value. +func (s *ModifyTransitGatewayVpcAttachmentInput) SetRemoveSubnetIds(v []*string) *ModifyTransitGatewayVpcAttachmentInput { + s.RemoveSubnetIds = v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *ModifyTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *ModifyTransitGatewayVpcAttachmentInput { + s.TransitGatewayAttachmentId = &v + return s +} + +type ModifyTransitGatewayVpcAttachmentOutput struct { + _ struct{} `type:"structure"` + + // Information about the modified attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` +} + +// String returns the string representation +func (s ModifyTransitGatewayVpcAttachmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTransitGatewayVpcAttachmentOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. +func (s *ModifyTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *ModifyTransitGatewayVpcAttachmentOutput { + s.TransitGatewayVpcAttachment = v + return s +} + +// 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 ModifyTransitGatewayVpcAttachmentRequestOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTransitGatewayVpcAttachmentRequestOptions) GoString() string { + return s.String() +} + +// SetDnsSupport sets the DnsSupport field's value. +func (s *ModifyTransitGatewayVpcAttachmentRequestOptions) SetDnsSupport(v string) *ModifyTransitGatewayVpcAttachmentRequestOptions { + s.DnsSupport = &v + return s +} + +// SetIpv6Support sets the Ipv6Support field's value. +func (s *ModifyTransitGatewayVpcAttachmentRequestOptions) SetIpv6Support(v string) *ModifyTransitGatewayVpcAttachmentRequestOptions { + s.Ipv6Support = &v + return s +} + // Contains the parameters for ModifyVolumeAttribute. type ModifyVolumeAttributeInput struct { _ struct{} `type:"structure"` @@ -56053,7 +63618,6 @@ func (s *ModifyVpcTenancyOutput) SetReturnValue(v bool) *ModifyVpcTenancyOutput return s } -// Contains the parameters for MonitorInstances. type MonitorInstancesInput struct { _ struct{} `type:"structure"` @@ -56104,7 +63668,6 @@ func (s *MonitorInstancesInput) SetInstanceIds(v []*string) *MonitorInstancesInp return s } -// Contains the output of MonitorInstances. type MonitorInstancesOutput struct { _ struct{} `type:"structure"` @@ -56153,7 +63716,6 @@ func (s *Monitoring) SetState(v string) *Monitoring { return s } -// Contains the parameters for MoveAddressToVpc. type MoveAddressToVpcInput struct { _ struct{} `type:"structure"` @@ -56204,7 +63766,6 @@ func (s *MoveAddressToVpcInput) SetPublicIp(v string) *MoveAddressToVpcInput { return s } -// Contains the output of MoveAddressToVpc. type MoveAddressToVpcOutput struct { _ struct{} `type:"structure"` @@ -56493,6 +64054,9 @@ type NetworkAcl struct { // The ID of the network ACL. NetworkAclId *string `locationName:"networkAclId" type:"string"` + // The ID of the AWS account that owns the network ACL. + OwnerId *string `locationName:"ownerId" type:"string"` + // Any tags assigned to the network ACL. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` @@ -56534,6 +64098,12 @@ func (s *NetworkAcl) SetNetworkAclId(v string) *NetworkAcl { return s } +// SetOwnerId sets the OwnerId field's value. +func (s *NetworkAcl) SetOwnerId(v string) *NetworkAcl { + s.OwnerId = &v + return s +} + // SetTags sets the Tags field's value. func (s *NetworkAcl) SetTags(v []*Tag) *NetworkAcl { s.Tags = v @@ -56608,7 +64178,7 @@ type NetworkAclEntry struct { // TCP or UDP protocols: The range of ports the rule applies to. PortRange *PortRange `locationName:"portRange" type:"structure"` - // The protocol. A value of -1 means all protocols. + // The protocol number. A value of "-1" means all protocols. Protocol *string `locationName:"protocol" type:"string"` // Indicates whether to allow or deny the traffic that matches the rule. @@ -57265,6 +64835,14 @@ type OnDemandOptions struct { // 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 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 @@ -57283,6 +64861,18 @@ func (s *OnDemandOptions) SetAllocationStrategy(v string) *OnDemandOptions { return s } +// SetMinTargetCapacity sets the MinTargetCapacity field's value. +func (s *OnDemandOptions) SetMinTargetCapacity(v int64) *OnDemandOptions { + s.MinTargetCapacity = &v + return s +} + +// SetSingleInstanceType sets the SingleInstanceType field's value. +func (s *OnDemandOptions) SetSingleInstanceType(v bool) *OnDemandOptions { + s.SingleInstanceType = &v + return s +} + // The allocation strategy of On-Demand Instances in an EC2 Fleet. type OnDemandOptionsRequest struct { _ struct{} `type:"structure"` @@ -57294,6 +64884,14 @@ type OnDemandOptionsRequest struct { // 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 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"` + + // 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 @@ -57312,6 +64910,18 @@ func (s *OnDemandOptionsRequest) SetAllocationStrategy(v string) *OnDemandOption return s } +// SetMinTargetCapacity sets the MinTargetCapacity field's value. +func (s *OnDemandOptionsRequest) SetMinTargetCapacity(v int64) *OnDemandOptionsRequest { + s.MinTargetCapacity = &v + return s +} + +// SetSingleInstanceType sets the SingleInstanceType field's value. +func (s *OnDemandOptionsRequest) SetSingleInstanceType(v bool) *OnDemandOptionsRequest { + s.SingleInstanceType = &v + return s +} + // Describes the data that identifies an Amazon FPGA image (AFI) on the PCI // bus. type PciId struct { @@ -57569,6 +65179,30 @@ func (s *PlacementGroup) SetStrategy(v string) *PlacementGroup { return s } +// Describes the placement of an instance. +type PlacementResponse struct { + _ struct{} `type:"structure"` + + // The name of the placement group the instance is in. + GroupName *string `locationName:"groupName" type:"string"` +} + +// String returns the string representation +func (s PlacementResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PlacementResponse) GoString() string { + return s.String() +} + +// SetGroupName sets the GroupName field's value. +func (s *PlacementResponse) SetGroupName(v string) *PlacementResponse { + s.GroupName = &v + return s +} + // Describes a range of ports. type PortRange struct { _ struct{} `type:"structure"` @@ -57944,6 +65578,105 @@ func (s *PropagatingVgw) SetGatewayId(v string) *PropagatingVgw { return s } +type ProvisionByoipCidrInput struct { + _ struct{} `type:"structure"` + + // 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"` + + // A signed document that proves that you are authorized to bring the specified + // IP address range to Amazon using BYOIP. + CidrAuthorizationContext *CidrAuthorizationContext `type:"structure"` + + // A description for the address range and the address pool. + 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"` +} + +// String returns the string representation +func (s ProvisionByoipCidrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisionByoipCidrInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetCidr sets the Cidr field's value. +func (s *ProvisionByoipCidrInput) SetCidr(v string) *ProvisionByoipCidrInput { + s.Cidr = &v + return s +} + +// SetCidrAuthorizationContext sets the CidrAuthorizationContext field's value. +func (s *ProvisionByoipCidrInput) SetCidrAuthorizationContext(v *CidrAuthorizationContext) *ProvisionByoipCidrInput { + s.CidrAuthorizationContext = v + return s +} + +// SetDescription sets the Description field's value. +func (s *ProvisionByoipCidrInput) SetDescription(v string) *ProvisionByoipCidrInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ProvisionByoipCidrInput) SetDryRun(v bool) *ProvisionByoipCidrInput { + s.DryRun = &v + return s +} + +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 +} + // 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?). @@ -58016,6 +65749,117 @@ func (s *ProvisionedBandwidth) SetStatus(v string) *ProvisionedBandwidth { return s } +// Describes an address pool. +type PublicIpv4Pool struct { + _ struct{} `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"` + + // The ID of the IPv4 address pool. + PoolId *string `locationName:"poolId" type:"string"` + + // The total number of addresses. + TotalAddressCount *int64 `locationName:"totalAddressCount" type:"integer"` + + // The total number of available addresses. + TotalAvailableAddressCount *int64 `locationName:"totalAvailableAddressCount" type:"integer"` +} + +// String returns the string representation +func (s PublicIpv4Pool) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicIpv4Pool) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *PublicIpv4Pool) SetDescription(v string) *PublicIpv4Pool { + s.Description = &v + return s +} + +// SetPoolAddressRanges sets the PoolAddressRanges field's value. +func (s *PublicIpv4Pool) SetPoolAddressRanges(v []*PublicIpv4PoolRange) *PublicIpv4Pool { + s.PoolAddressRanges = v + return s +} + +// SetPoolId sets the PoolId field's value. +func (s *PublicIpv4Pool) SetPoolId(v string) *PublicIpv4Pool { + s.PoolId = &v + return s +} + +// SetTotalAddressCount sets the TotalAddressCount field's value. +func (s *PublicIpv4Pool) SetTotalAddressCount(v int64) *PublicIpv4Pool { + s.TotalAddressCount = &v + return s +} + +// 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"` + + // The number of addresses in the range. + AddressCount *int64 `locationName:"addressCount" type:"integer"` + + // 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 PublicIpv4PoolRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicIpv4PoolRange) GoString() string { + return s.String() +} + +// SetAddressCount sets the AddressCount field's value. +func (s *PublicIpv4PoolRange) SetAddressCount(v int64) *PublicIpv4PoolRange { + s.AddressCount = &v + return s +} + +// SetAvailableAddressCount sets the AvailableAddressCount field's value. +func (s *PublicIpv4PoolRange) SetAvailableAddressCount(v int64) *PublicIpv4PoolRange { + s.AvailableAddressCount = &v + return s +} + +// SetFirstAddress sets the FirstAddress field's value. +func (s *PublicIpv4PoolRange) SetFirstAddress(v string) *PublicIpv4PoolRange { + s.FirstAddress = &v + return s +} + +// SetLastAddress sets the LastAddress field's value. +func (s *PublicIpv4PoolRange) SetLastAddress(v string) *PublicIpv4PoolRange { + s.LastAddress = &v + return s +} + // Describes the result of the purchase. type Purchase struct { _ struct{} `type:"structure"` @@ -58505,7 +66349,6 @@ func (s *PurchaseScheduledInstancesOutput) SetScheduledInstanceSet(v []*Schedule return s } -// Contains the parameters for RebootInstances. type RebootInstancesInput struct { _ struct{} `type:"structure"` @@ -58832,6 +66675,79 @@ func (s *RegisterImageOutput) SetImageId(v string) *RegisterImageOutput { return s } +type RejectTransitGatewayVpcAttachmentInput 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 RejectTransitGatewayVpcAttachmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectTransitGatewayVpcAttachmentInput) GoString() string { + return s.String() +} + +// 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")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *RejectTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *RejectTransitGatewayVpcAttachmentInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *RejectTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *RejectTransitGatewayVpcAttachmentInput { + s.TransitGatewayAttachmentId = &v + return s +} + +type RejectTransitGatewayVpcAttachmentOutput struct { + _ struct{} `type:"structure"` + + // Information about the attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` +} + +// String returns the string representation +func (s RejectTransitGatewayVpcAttachmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectTransitGatewayVpcAttachmentOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. +func (s *RejectTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *RejectTransitGatewayVpcAttachmentOutput { + s.TransitGatewayVpcAttachment = v + return s +} + type RejectVpcEndpointConnectionsInput struct { _ struct{} `type:"structure"` @@ -58992,7 +66908,6 @@ func (s *RejectVpcPeeringConnectionOutput) SetReturn(v bool) *RejectVpcPeeringCo return s } -// Contains the parameters for ReleaseAddress. type ReleaseAddressInput struct { _ struct{} `type:"structure"` @@ -59304,8 +67219,8 @@ type ReplaceNetworkAclEntryInput struct { // 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. + // 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). @@ -59317,16 +67232,16 @@ type ReplaceNetworkAclEntryInput struct { NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` // TCP or UDP protocols: The range of ports the rule applies to. Required if - // specifying TCP (6) or UDP (17) for the protocol. + // specifying protocol 6 (TCP) or 17 (UDP). PortRange *PortRange `locationName:"portRange" 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. + // 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"` @@ -59488,6 +67403,9 @@ type ReplaceRouteInput struct { // 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"` } @@ -59569,6 +67487,12 @@ func (s *ReplaceRouteInput) SetRouteTableId(v string) *ReplaceRouteInput { return s } +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *ReplaceRouteInput) SetTransitGatewayId(v string) *ReplaceRouteInput { + s.TransitGatewayId = &v + return s +} + // SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. func (s *ReplaceRouteInput) SetVpcPeeringConnectionId(v string) *ReplaceRouteInput { s.VpcPeeringConnectionId = &v @@ -59676,7 +67600,112 @@ func (s *ReplaceRouteTableAssociationOutput) SetNewAssociationId(v string) *Repl return s } -// Contains the parameters for ReportInstanceStatus. +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 `type:"boolean"` + + // The ID of the attachment. + TransitGatewayAttachmentId *string `type:"string"` + + // The ID of the route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ReplaceTransitGatewayRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceTransitGatewayRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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 { + return invalidParams + } + 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 *ReplaceTransitGatewayRouteInput) SetDryRun(v bool) *ReplaceTransitGatewayRouteInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *ReplaceTransitGatewayRouteInput) SetTransitGatewayAttachmentId(v string) *ReplaceTransitGatewayRouteInput { + s.TransitGatewayAttachmentId = &v + return s +} + +// 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"` + + // Information about the modified route. + Route *TransitGatewayRoute `locationName:"route" type:"structure"` +} + +// String returns the string representation +func (s ReplaceTransitGatewayRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceTransitGatewayRouteOutput) GoString() string { + return s.String() +} + +// 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"` @@ -59830,6 +67859,9 @@ type RequestLaunchTemplateData struct { // 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. @@ -59853,6 +67885,16 @@ type RequestLaunchTemplateData struct { // 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"` @@ -59886,6 +67928,9 @@ type RequestLaunchTemplateData struct { // 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"` @@ -59953,6 +67998,16 @@ func (s *RequestLaunchTemplateData) Validate() error { } } } + 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 { return invalidParams @@ -59966,6 +68021,12 @@ func (s *RequestLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBl return s } +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *RequestLaunchTemplateData) SetCapacityReservationSpecification(v *LaunchTemplateCapacityReservationSpecificationRequest) *RequestLaunchTemplateData { + s.CapacityReservationSpecification = v + return s +} + // SetCpuOptions sets the CpuOptions field's value. func (s *RequestLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptionsRequest) *RequestLaunchTemplateData { s.CpuOptions = v @@ -59996,6 +68057,18 @@ func (s *RequestLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuS return s } +// SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value. +func (s *RequestLaunchTemplateData) SetElasticInferenceAccelerators(v []*LaunchTemplateElasticInferenceAccelerator) *RequestLaunchTemplateData { + s.ElasticInferenceAccelerators = v + return s +} + +// SetHibernationOptions sets the HibernationOptions field's value. +func (s *RequestLaunchTemplateData) SetHibernationOptions(v *LaunchTemplateHibernationOptionsRequest) *RequestLaunchTemplateData { + s.HibernationOptions = v + return s +} + // SetIamInstanceProfile sets the IamInstanceProfile field's value. func (s *RequestLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecificationRequest) *RequestLaunchTemplateData { s.IamInstanceProfile = v @@ -60038,6 +68111,12 @@ func (s *RequestLaunchTemplateData) SetKeyName(v string) *RequestLaunchTemplateD return s } +// SetLicenseSpecifications sets the LicenseSpecifications field's value. +func (s *RequestLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplateLicenseConfigurationRequest) *RequestLaunchTemplateData { + s.LicenseSpecifications = v + return s +} + // SetMonitoring sets the Monitoring field's value. func (s *RequestLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoringRequest) *RequestLaunchTemplateData { s.Monitoring = v @@ -61563,7 +69642,6 @@ func (s ResetImageAttributeOutput) GoString() string { return s.String() } -// Contains the parameters for ResetInstanceAttribute. type ResetInstanceAttributeInput struct { _ struct{} `type:"structure"` @@ -61840,6 +69918,9 @@ type ResponseLaunchTemplateData struct { // The block device mappings. BlockDeviceMappings []*LaunchTemplateBlockDeviceMapping `locationName:"blockDeviceMappingSet" locationNameList:"item" type:"list"` + // Information about the Capacity Reservation targeting option. + CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationResponse `locationName:"capacityReservationSpecification" 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. @@ -61858,6 +69939,14 @@ type ResponseLaunchTemplateData struct { // 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"` @@ -61880,6 +69969,9 @@ type ResponseLaunchTemplateData struct { // 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"` @@ -61921,6 +70013,12 @@ func (s *ResponseLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateB return s } +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *ResponseLaunchTemplateData) SetCapacityReservationSpecification(v *LaunchTemplateCapacityReservationSpecificationResponse) *ResponseLaunchTemplateData { + s.CapacityReservationSpecification = v + return s +} + // SetCpuOptions sets the CpuOptions field's value. func (s *ResponseLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptions) *ResponseLaunchTemplateData { s.CpuOptions = v @@ -61951,6 +70049,18 @@ func (s *ResponseLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpu return s } +// SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value. +func (s *ResponseLaunchTemplateData) SetElasticInferenceAccelerators(v []*LaunchTemplateElasticInferenceAcceleratorResponse) *ResponseLaunchTemplateData { + s.ElasticInferenceAccelerators = v + return s +} + +// SetHibernationOptions sets the HibernationOptions field's value. +func (s *ResponseLaunchTemplateData) SetHibernationOptions(v *LaunchTemplateHibernationOptions) *ResponseLaunchTemplateData { + s.HibernationOptions = v + return s +} + // SetIamInstanceProfile sets the IamInstanceProfile field's value. func (s *ResponseLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecification) *ResponseLaunchTemplateData { s.IamInstanceProfile = v @@ -61993,6 +70103,12 @@ func (s *ResponseLaunchTemplateData) SetKeyName(v string) *ResponseLaunchTemplat return s } +// SetLicenseSpecifications sets the LicenseSpecifications field's value. +func (s *ResponseLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplateLicenseConfiguration) *ResponseLaunchTemplateData { + s.LicenseSpecifications = v + return s +} + // SetMonitoring sets the Monitoring field's value. func (s *ResponseLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoring) *ResponseLaunchTemplateData { s.Monitoring = v @@ -62041,7 +70157,6 @@ func (s *ResponseLaunchTemplateData) SetUserData(v string) *ResponseLaunchTempla return s } -// Contains the parameters for RestoreAddressToClassic. type RestoreAddressToClassicInput struct { _ struct{} `type:"structure"` @@ -62092,7 +70207,6 @@ func (s *RestoreAddressToClassicInput) SetPublicIp(v string) *RestoreAddressToCl return s } -// Contains the output of RestoreAddressToClassic. type RestoreAddressToClassicOutput struct { _ struct{} `type:"structure"` @@ -62441,7 +70555,10 @@ type Route struct { // VPC, or the specified NAT instance has been terminated). State *string `locationName:"state" type:"string" enum:"RouteState"` - // The ID of the VPC peering connection. + // 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"` } @@ -62521,6 +70638,12 @@ func (s *Route) SetState(v string) *Route { return s } +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *Route) SetTransitGatewayId(v string) *Route { + s.TransitGatewayId = &v + return s +} + // SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. func (s *Route) SetVpcPeeringConnectionId(v string) *Route { s.VpcPeeringConnectionId = &v @@ -62534,6 +70657,9 @@ type RouteTable struct { // The associations between the route table and one or more subnets. Associations []*RouteTableAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` + // The ID of the AWS account that owns the route table. + OwnerId *string `locationName:"ownerId" type:"string"` + // Any virtual private gateway (VGW) propagating routes. PropagatingVgws []*PropagatingVgw `locationName:"propagatingVgwSet" locationNameList:"item" type:"list"` @@ -62566,6 +70692,12 @@ func (s *RouteTable) SetAssociations(v []*RouteTableAssociation) *RouteTable { return s } +// SetOwnerId sets the OwnerId field's value. +func (s *RouteTable) SetOwnerId(v string) *RouteTable { + s.OwnerId = &v + return s +} + // SetPropagatingVgws sets the PropagatingVgws field's value. func (s *RouteTable) SetPropagatingVgws(v []*PropagatingVgw) *RouteTable { s.PropagatingVgws = v @@ -62647,7 +70779,6 @@ func (s *RouteTableAssociation) SetSubnetId(v string) *RouteTableAssociation { return s } -// Contains the parameters for RunInstances. type RunInstancesInput struct { _ struct{} `type:"structure"` @@ -62660,6 +70791,9 @@ type RunInstancesInput struct { // 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). // @@ -62706,6 +70840,14 @@ type RunInstancesInput struct { // 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"` @@ -62765,6 +70907,9 @@ type RunInstancesInput struct { // You can specify either the name or ID of a launch template, but not both. LaunchTemplate *LaunchTemplateSpecification `type:"structure"` + // The license configurations. + LicenseSpecifications []*LicenseConfigurationRequest `locationName:"LicenseSpecification" locationNameList:"item" type:"list"` + // 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. @@ -62877,6 +71022,16 @@ func (s *RunInstancesInput) Validate() error { } } } + 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)) @@ -62901,6 +71056,12 @@ func (s *RunInstancesInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *Run 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 @@ -62943,6 +71104,18 @@ func (s *RunInstancesInput) SetElasticGpuSpecification(v []*ElasticGpuSpecificat 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 *RunInstancesInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RunInstancesInput { s.IamInstanceProfile = v @@ -63003,6 +71176,12 @@ func (s *RunInstancesInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *R 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 @@ -64305,6 +72484,125 @@ func (s *ScheduledInstancesPrivateIpAddressConfig) SetPrivateIpAddress(v string) return s } +type SearchTransitGatewayRoutesInput 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: + // + // * transit-gateway-route-destination-cidr-block - The CIDR range. + // + // * 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). + // + // * transit-gateway-route-vpn-connection-id - The ID of the VPN connection. + // + // Filters is a required field + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list" required:"true"` + + // The maximum number of routes to return. + MaxResults *int64 `min:"5" type:"integer"` + + // 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 SearchTransitGatewayRoutesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchTransitGatewayRoutesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SearchTransitGatewayRoutesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SearchTransitGatewayRoutesInput"} + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + 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 *SearchTransitGatewayRoutesInput) SetDryRun(v bool) *SearchTransitGatewayRoutesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *SearchTransitGatewayRoutesInput) SetFilters(v []*Filter) *SearchTransitGatewayRoutesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *SearchTransitGatewayRoutesInput) SetMaxResults(v int64) *SearchTransitGatewayRoutesInput { + s.MaxResults = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *SearchTransitGatewayRoutesInput) SetTransitGatewayRouteTableId(v string) *SearchTransitGatewayRoutesInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type SearchTransitGatewayRoutesOutput struct { + _ struct{} `type:"structure"` + + // 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 SearchTransitGatewayRoutesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchTransitGatewayRoutesOutput) GoString() string { + return s.String() +} + +// SetAdditionalRoutesAvailable sets the AdditionalRoutesAvailable field's value. +func (s *SearchTransitGatewayRoutesOutput) SetAdditionalRoutesAvailable(v bool) *SearchTransitGatewayRoutesOutput { + s.AdditionalRoutesAvailable = &v + return s +} + +// 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"` @@ -64430,14 +72728,10 @@ type SecurityGroupReference struct { _ struct{} `type:"structure"` // The ID of your security group. - // - // GroupId is a required field - GroupId *string `locationName:"groupId" type:"string" required:"true"` + GroupId *string `locationName:"groupId" type:"string"` // The ID of the VPC with the referencing security group. - // - // ReferencingVpcId is a required field - ReferencingVpcId *string `locationName:"referencingVpcId" type:"string" required:"true"` + ReferencingVpcId *string `locationName:"referencingVpcId" type:"string"` // The ID of the VPC peering connection. VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` @@ -65095,9 +73389,16 @@ type SnapshotTaskDetail struct { // The size of the disk in the snapshot, in GiB. DiskImageSize *float64 `locationName:"diskImageSize" type:"double"` + // Indicates whether the snapshot is encrypted. + Encrypted *bool `locationName:"encrypted" type:"boolean"` + // The format of the disk image from which the snapshot is created. Format *string `locationName:"format" 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 percentage of completion for the import snapshot task. Progress *string `locationName:"progress" type:"string"` @@ -65139,12 +73440,24 @@ func (s *SnapshotTaskDetail) SetDiskImageSize(v float64) *SnapshotTaskDetail { return s } +// SetEncrypted sets the Encrypted field's value. +func (s *SnapshotTaskDetail) SetEncrypted(v bool) *SnapshotTaskDetail { + s.Encrypted = &v + return s +} + // SetFormat sets the Format field's value. func (s *SnapshotTaskDetail) SetFormat(v string) *SnapshotTaskDetail { s.Format = &v return s } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *SnapshotTaskDetail) SetKmsKeyId(v string) *SnapshotTaskDetail { + s.KmsKeyId = &v + return s +} + // SetProgress sets the Progress field's value. func (s *SnapshotTaskDetail) SetProgress(v string) *SnapshotTaskDetail { s.Progress = &v @@ -65557,7 +73870,7 @@ type SpotFleetRequestConfigData struct { ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` // The number of units fulfilled by this request compared to the set target - // capacity. + // capacity. You cannot set this value. FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` // Grants the Spot Fleet permission to terminate Spot Instances on your behalf @@ -66205,6 +74518,14 @@ type SpotOptions struct { // 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 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 uses a single instance type to launch all Spot Instances + // in the fleet. + SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` } // String returns the string representation @@ -66235,6 +74556,18 @@ func (s *SpotOptions) SetInstancePoolsToUseCount(v int64) *SpotOptions { return s } +// SetMinTargetCapacity sets the MinTargetCapacity field's value. +func (s *SpotOptions) SetMinTargetCapacity(v int64) *SpotOptions { + s.MinTargetCapacity = &v + return s +} + +// SetSingleInstanceType sets the SingleInstanceType field's value. +func (s *SpotOptions) SetSingleInstanceType(v bool) *SpotOptions { + s.SingleInstanceType = &v + return s +} + // Describes the configuration of Spot Instances in an EC2 Fleet request. type SpotOptionsRequest struct { _ struct{} `type:"structure"` @@ -66251,6 +74584,14 @@ type SpotOptionsRequest struct { // 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 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"` + + // 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 @@ -66281,6 +74622,18 @@ func (s *SpotOptionsRequest) SetInstancePoolsToUseCount(v int64) *SpotOptionsReq return s } +// SetMinTargetCapacity sets the MinTargetCapacity field's value. +func (s *SpotOptionsRequest) SetMinTargetCapacity(v int64) *SpotOptionsRequest { + s.MinTargetCapacity = &v + return s +} + +// SetSingleInstanceType sets the SingleInstanceType field's value. +func (s *SpotOptionsRequest) SetSingleInstanceType(v bool) *SpotOptionsRequest { + s.SingleInstanceType = &v + return s +} + // Describes Spot Instance placement. type SpotPlacement struct { _ struct{} `type:"structure"` @@ -66471,9 +74824,7 @@ type StaleSecurityGroup struct { 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"` + GroupId *string `locationName:"groupId" type:"string"` // The name of the security group. GroupName *string `locationName:"groupName" type:"string"` @@ -66534,7 +74885,6 @@ func (s *StaleSecurityGroup) SetVpcId(v string) *StaleSecurityGroup { return s } -// Contains the parameters for StartInstances. type StartInstancesInput struct { _ struct{} `type:"structure"` @@ -66594,7 +74944,6 @@ func (s *StartInstancesInput) SetInstanceIds(v []*string) *StartInstancesInput { return s } -// Contains the output of StartInstances. type StartInstancesOutput struct { _ struct{} `type:"structure"` @@ -66656,6 +75005,8 @@ type StateReason struct { // // * 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. // @@ -66687,7 +75038,6 @@ func (s *StateReason) SetMessage(v string) *StateReason { return s } -// Contains the parameters for StopInstances. type StopInstancesInput struct { _ struct{} `type:"structure"` @@ -66705,6 +75055,14 @@ type StopInstancesInput struct { // Default: false Force *bool `locationName:"force" type:"boolean"` + // 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. + // + // Default: false + Hibernate *bool `type:"boolean"` + // One or more instance IDs. // // InstanceIds is a required field @@ -66746,13 +75104,18 @@ func (s *StopInstancesInput) SetForce(v bool) *StopInstancesInput { return s } +// SetHibernate sets the Hibernate field's value. +func (s *StopInstancesInput) SetHibernate(v bool) *StopInstancesInput { + s.Hibernate = &v + return s +} + // SetInstanceIds sets the InstanceIds field's value. func (s *StopInstancesInput) SetInstanceIds(v []*string) *StopInstancesInput { s.InstanceIds = v return s } -// Contains the output of StopInstances. type StopInstancesOutput struct { _ struct{} `type:"structure"` @@ -66844,6 +75207,9 @@ type Subnet struct { // The Availability Zone of the subnet. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + // The AZ ID of the subnet. + AvailabilityZoneId *string `locationName:"availabilityZoneId" type:"string"` + // 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"` @@ -66861,9 +75227,15 @@ type Subnet struct { // address. MapPublicIpOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"` + // The ID of the AWS account that owns the subnet. + OwnerId *string `locationName:"ownerId" type:"string"` + // The current state of the subnet. State *string `locationName:"state" type:"string" enum:"SubnetState"` + // The Amazon Resource Name (ARN) of the subnet. + SubnetArn *string `locationName:"subnetArn" type:"string"` + // The ID of the subnet. SubnetId *string `locationName:"subnetId" type:"string"` @@ -66896,6 +75268,12 @@ func (s *Subnet) SetAvailabilityZone(v string) *Subnet { return s } +// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. +func (s *Subnet) SetAvailabilityZoneId(v string) *Subnet { + s.AvailabilityZoneId = &v + return s +} + // SetAvailableIpAddressCount sets the AvailableIpAddressCount field's value. func (s *Subnet) SetAvailableIpAddressCount(v int64) *Subnet { s.AvailableIpAddressCount = &v @@ -66926,12 +75304,24 @@ func (s *Subnet) SetMapPublicIpOnLaunch(v bool) *Subnet { return s } +// SetOwnerId sets the OwnerId field's value. +func (s *Subnet) SetOwnerId(v string) *Subnet { + s.OwnerId = &v + return s +} + // SetState sets the State field's value. func (s *Subnet) SetState(v string) *Subnet { s.State = &v return s } +// SetSubnetArn sets the SubnetArn field's value. +func (s *Subnet) SetSubnetArn(v string) *Subnet { + s.SubnetArn = &v + return s +} + // SetSubnetId sets the SubnetId field's value. func (s *Subnet) SetSubnetId(v string) *Subnet { s.SubnetId = &v @@ -67096,7 +75486,7 @@ type TagDescription struct { // 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. @@ -67511,7 +75901,6 @@ func (s *TargetReservationValue) SetTargetConfiguration(v *TargetConfiguration) return s } -// Contains the parameters for TerminateInstances. type TerminateInstancesInput struct { _ struct{} `type:"structure"` @@ -67565,7 +75954,6 @@ func (s *TerminateInstancesInput) SetInstanceIds(v []*string) *TerminateInstance return s } -// Contains the output of TerminateInstances. type TerminateInstancesOutput struct { _ struct{} `type:"structure"` @@ -67589,6 +75977,954 @@ func (s *TerminateInstancesOutput) SetTerminatingInstances(v []*InstanceStateCha return s } +// Describes a transit gateway. +type TransitGateway struct { + _ struct{} `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 TransitGateway) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGateway) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGateway) SetCreationTime(v time.Time) *TransitGateway { + s.CreationTime = &v + return s +} + +// 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 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"` + + // The ID of the transit gateway route table. + TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` +} + +// String returns the string representation +func (s TransitGatewayAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayAssociation) GoString() string { + return s.String() +} + +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayAssociation) SetResourceId(v string) *TransitGatewayAssociation { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayAssociation) SetResourceType(v string) *TransitGatewayAssociation { + s.ResourceType = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayAssociation) SetState(v string) *TransitGatewayAssociation { + s.State = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayAssociation) SetTransitGatewayAttachmentId(v string) *TransitGatewayAssociation { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayAssociation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAssociation { + s.TransitGatewayRouteTableId = &v + return s +} + +// Describes an attachment between a resource and a transit gateway. +type TransitGatewayAttachment struct { + _ struct{} `type:"structure"` + + // The association. + Association *TransitGatewayAttachmentAssociation `locationName:"association" type:"structure"` + + // The creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // The ID of the resource. + ResourceId *string `locationName:"resourceId" type:"string"` + + // The ID of the AWS account that owns the resource. + ResourceOwnerId *string `locationName:"resourceOwnerId" type:"string"` + + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` + + // The attachment state. + State *string `locationName:"state" type:"string" enum:"TransitGatewayAttachmentState"` + + // The tags for the attachment. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the 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 TransitGatewayAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayAttachment) GoString() string { + return s.String() +} + +// SetAssociation sets the Association field's value. +func (s *TransitGatewayAttachment) SetAssociation(v *TransitGatewayAttachmentAssociation) *TransitGatewayAttachment { + s.Association = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGatewayAttachment) SetCreationTime(v time.Time) *TransitGatewayAttachment { + s.CreationTime = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayAttachment) SetResourceId(v string) *TransitGatewayAttachment { + s.ResourceId = &v + return s +} + +// SetResourceOwnerId sets the ResourceOwnerId field's value. +func (s *TransitGatewayAttachment) SetResourceOwnerId(v string) *TransitGatewayAttachment { + s.ResourceOwnerId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayAttachment) SetResourceType(v string) *TransitGatewayAttachment { + s.ResourceType = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayAttachment) SetState(v string) *TransitGatewayAttachment { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TransitGatewayAttachment) SetTags(v []*Tag) *TransitGatewayAttachment { + s.Tags = v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayAttachment) SetTransitGatewayAttachmentId(v string) *TransitGatewayAttachment { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *TransitGatewayAttachment) SetTransitGatewayId(v string) *TransitGatewayAttachment { + s.TransitGatewayId = &v + return s +} + +// SetTransitGatewayOwnerId sets the TransitGatewayOwnerId field's value. +func (s *TransitGatewayAttachment) SetTransitGatewayOwnerId(v string) *TransitGatewayAttachment { + s.TransitGatewayOwnerId = &v + return s +} + +// Describes an association. +type TransitGatewayAttachmentAssociation struct { + _ struct{} `type:"structure"` + + // The state of the association. + State *string `locationName:"state" type:"string" enum:"TransitGatewayAssociationState"` + + // The ID of the route table for the transit gateway. + TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` +} + +// String returns the string representation +func (s TransitGatewayAttachmentAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayAttachmentAssociation) GoString() string { + return s.String() +} + +// SetState sets the State field's value. +func (s *TransitGatewayAttachmentAssociation) SetState(v string) *TransitGatewayAttachmentAssociation { + s.State = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayAttachmentAssociation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAttachmentAssociation { + s.TransitGatewayRouteTableId = &v + return s +} + +// Describes a propagation route table. +type TransitGatewayAttachmentPropagation struct { + _ struct{} `type:"structure"` + + // The state of the propagation route table. + State *string `locationName:"state" type:"string" enum:"TransitGatewayPropagationState"` + + // The ID of the propagation route table. + TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` +} + +// String returns the string representation +func (s TransitGatewayAttachmentPropagation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayAttachmentPropagation) GoString() string { + return s.String() +} + +// SetState sets the State field's value. +func (s *TransitGatewayAttachmentPropagation) SetState(v string) *TransitGatewayAttachmentPropagation { + s.State = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayAttachmentPropagation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAttachmentPropagation { + s.TransitGatewayRouteTableId = &v + return s +} + +// Describes the options for a transit gateway. +type TransitGatewayOptions struct { + _ struct{} `type:"structure"` + + // 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 TransitGatewayOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayOptions) GoString() string { + return s.String() +} + +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *TransitGatewayOptions) SetAmazonSideAsn(v int64) *TransitGatewayOptions { + s.AmazonSideAsn = &v + return s +} + +// SetAssociationDefaultRouteTableId sets the AssociationDefaultRouteTableId field's value. +func (s *TransitGatewayOptions) SetAssociationDefaultRouteTableId(v string) *TransitGatewayOptions { + s.AssociationDefaultRouteTableId = &v + return s +} + +// SetAutoAcceptSharedAttachments sets the AutoAcceptSharedAttachments field's value. +func (s *TransitGatewayOptions) SetAutoAcceptSharedAttachments(v string) *TransitGatewayOptions { + s.AutoAcceptSharedAttachments = &v + return s +} + +// SetDefaultRouteTableAssociation sets the DefaultRouteTableAssociation field's value. +func (s *TransitGatewayOptions) SetDefaultRouteTableAssociation(v string) *TransitGatewayOptions { + s.DefaultRouteTableAssociation = &v + return s +} + +// SetDefaultRouteTablePropagation sets the DefaultRouteTablePropagation field's value. +func (s *TransitGatewayOptions) SetDefaultRouteTablePropagation(v string) *TransitGatewayOptions { + s.DefaultRouteTablePropagation = &v + return s +} + +// SetDnsSupport sets the DnsSupport field's value. +func (s *TransitGatewayOptions) SetDnsSupport(v string) *TransitGatewayOptions { + s.DnsSupport = &v + return s +} + +// SetPropagationDefaultRouteTableId sets the PropagationDefaultRouteTableId field's value. +func (s *TransitGatewayOptions) SetPropagationDefaultRouteTableId(v string) *TransitGatewayOptions { + s.PropagationDefaultRouteTableId = &v + return s +} + +// SetVpnEcmpSupport sets the VpnEcmpSupport field's value. +func (s *TransitGatewayOptions) SetVpnEcmpSupport(v string) *TransitGatewayOptions { + s.VpnEcmpSupport = &v + return s +} + +// Describes route propagation. +type TransitGatewayPropagation struct { + _ struct{} `type:"structure"` + + // The ID of the resource. + ResourceId *string `locationName:"resourceId" type:"string"` + + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` + + // 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 TransitGatewayPropagation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayPropagation) GoString() string { + return s.String() +} + +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayPropagation) SetResourceId(v string) *TransitGatewayPropagation { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayPropagation) SetResourceType(v string) *TransitGatewayPropagation { + s.ResourceType = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayPropagation) SetState(v string) *TransitGatewayPropagation { + s.State = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayPropagation) SetTransitGatewayAttachmentId(v string) *TransitGatewayPropagation { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayPropagation) SetTransitGatewayRouteTableId(v string) *TransitGatewayPropagation { + s.TransitGatewayRouteTableId = &v + return s +} + +// Describes the options for a transit gateway. +type TransitGatewayRequestOptions struct { + _ struct{} `type:"structure"` + + // 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"` + + // Enable or disable automatic acceptance of attachment requests. The default + // is disable. + AutoAcceptSharedAttachments *string `type:"string" enum:"AutoAcceptSharedAttachmentsValue"` + + // Enable or disable automatic association with the default association route + // table. The default is enable. + DefaultRouteTableAssociation *string `type:"string" enum:"DefaultRouteTableAssociationValue"` + + // 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 TransitGatewayRequestOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayRequestOptions) GoString() string { + return s.String() +} + +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *TransitGatewayRequestOptions) SetAmazonSideAsn(v int64) *TransitGatewayRequestOptions { + s.AmazonSideAsn = &v + return s +} + +// SetAutoAcceptSharedAttachments sets the AutoAcceptSharedAttachments field's value. +func (s *TransitGatewayRequestOptions) SetAutoAcceptSharedAttachments(v string) *TransitGatewayRequestOptions { + s.AutoAcceptSharedAttachments = &v + return s +} + +// SetDefaultRouteTableAssociation sets the DefaultRouteTableAssociation field's value. +func (s *TransitGatewayRequestOptions) SetDefaultRouteTableAssociation(v string) *TransitGatewayRequestOptions { + s.DefaultRouteTableAssociation = &v + return s +} + +// SetDefaultRouteTablePropagation sets the DefaultRouteTablePropagation field's value. +func (s *TransitGatewayRequestOptions) SetDefaultRouteTablePropagation(v string) *TransitGatewayRequestOptions { + s.DefaultRouteTablePropagation = &v + return s +} + +// 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 CIDR block used for destination matches. + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` + + // The state of the route. + State *string `locationName:"state" type:"string" enum:"TransitGatewayRouteState"` + + // The attachments. + TransitGatewayAttachments []*TransitGatewayRouteAttachment `locationName:"transitGatewayAttachments" locationNameList:"item" type:"list"` + + // The route type. + Type *string `locationName:"type" type:"string" enum:"TransitGatewayRouteType"` +} + +// String returns the string representation +func (s TransitGatewayRoute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayRoute) GoString() string { + return s.String() +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *TransitGatewayRoute) SetDestinationCidrBlock(v string) *TransitGatewayRoute { + s.DestinationCidrBlock = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayRoute) SetState(v string) *TransitGatewayRoute { + s.State = &v + return s +} + +// SetTransitGatewayAttachments sets the TransitGatewayAttachments field's value. +func (s *TransitGatewayRoute) SetTransitGatewayAttachments(v []*TransitGatewayRouteAttachment) *TransitGatewayRoute { + s.TransitGatewayAttachments = v + return s +} + +// SetType sets the Type field's value. +func (s *TransitGatewayRoute) SetType(v string) *TransitGatewayRoute { + s.Type = &v + return s +} + +// Describes a route attachment. +type TransitGatewayRouteAttachment struct { + _ struct{} `type:"structure"` + + // The ID of the resource. + ResourceId *string `locationName:"resourceId" 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 TransitGatewayRouteAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayRouteAttachment) GoString() string { + return s.String() +} + +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayRouteAttachment) SetResourceId(v string) *TransitGatewayRouteAttachment { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayRouteAttachment) SetResourceType(v string) *TransitGatewayRouteAttachment { + s.ResourceType = &v + return s +} + +// 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 creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // 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 TransitGatewayRouteTable) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayRouteTable) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGatewayRouteTable) SetCreationTime(v time.Time) *TransitGatewayRouteTable { + s.CreationTime = &v + return s +} + +// SetDefaultAssociationRouteTable sets the DefaultAssociationRouteTable field's value. +func (s *TransitGatewayRouteTable) SetDefaultAssociationRouteTable(v bool) *TransitGatewayRouteTable { + s.DefaultAssociationRouteTable = &v + return s +} + +// SetDefaultPropagationRouteTable sets the DefaultPropagationRouteTable field's value. +func (s *TransitGatewayRouteTable) SetDefaultPropagationRouteTable(v bool) *TransitGatewayRouteTable { + s.DefaultPropagationRouteTable = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayRouteTable) SetState(v string) *TransitGatewayRouteTable { + s.State = &v + return s +} + +// 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 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 TransitGatewayRouteTableAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayRouteTableAssociation) GoString() string { + return s.String() +} + +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayRouteTableAssociation) SetResourceId(v string) *TransitGatewayRouteTableAssociation { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayRouteTableAssociation) SetResourceType(v string) *TransitGatewayRouteTableAssociation { + s.ResourceType = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayRouteTableAssociation) SetState(v string) *TransitGatewayRouteTableAssociation { + s.State = &v + return s +} + +// 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"` + + // 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 TransitGatewayRouteTablePropagation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayRouteTablePropagation) GoString() string { + return s.String() +} + +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayRouteTablePropagation) SetResourceId(v string) *TransitGatewayRouteTablePropagation { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayRouteTablePropagation) SetResourceType(v string) *TransitGatewayRouteTablePropagation { + s.ResourceType = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayRouteTablePropagation) SetState(v string) *TransitGatewayRouteTablePropagation { + s.State = &v + return s +} + +// 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 creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // 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 TransitGatewayVpcAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayVpcAttachment) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGatewayVpcAttachment) SetCreationTime(v time.Time) *TransitGatewayVpcAttachment { + s.CreationTime = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *TransitGatewayVpcAttachment) SetOptions(v *TransitGatewayVpcAttachmentOptions) *TransitGatewayVpcAttachment { + s.Options = v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayVpcAttachment) SetState(v string) *TransitGatewayVpcAttachment { + s.State = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *TransitGatewayVpcAttachment) SetSubnetIds(v []*string) *TransitGatewayVpcAttachment { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *TransitGatewayVpcAttachment) SetTags(v []*Tag) *TransitGatewayVpcAttachment { + s.Tags = v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayVpcAttachment) SetTransitGatewayAttachmentId(v string) *TransitGatewayVpcAttachment { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *TransitGatewayVpcAttachment) SetTransitGatewayId(v string) *TransitGatewayVpcAttachment { + s.TransitGatewayId = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *TransitGatewayVpcAttachment) SetVpcId(v string) *TransitGatewayVpcAttachment { + s.VpcId = &v + return s +} + +// SetVpcOwnerId sets the VpcOwnerId field's value. +func (s *TransitGatewayVpcAttachment) SetVpcOwnerId(v string) *TransitGatewayVpcAttachment { + s.VpcOwnerId = &v + return s +} + +// Describes the VPC attachment options. +type TransitGatewayVpcAttachmentOptions struct { + _ struct{} `type:"structure"` + + // 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 TransitGatewayVpcAttachmentOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayVpcAttachmentOptions) GoString() string { + return s.String() +} + +// 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 +} + type UnassignIpv6AddressesInput struct { _ struct{} `type:"structure"` @@ -67741,7 +77077,6 @@ func (s UnassignPrivateIpAddressesOutput) GoString() string { return s.String() } -// Contains the parameters for UnmonitorInstances. type UnmonitorInstancesInput struct { _ struct{} `type:"structure"` @@ -67792,7 +77127,6 @@ func (s *UnmonitorInstancesInput) SetInstanceIds(v []*string) *UnmonitorInstance return s } -// Contains the output of UnmonitorInstances. type UnmonitorInstancesOutput struct { _ struct{} `type:"structure"` @@ -68418,8 +77752,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-10,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. @@ -69026,6 +78364,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"` @@ -69082,6 +78423,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 @@ -69745,6 +79092,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"` @@ -69810,6 +79160,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 @@ -70073,6 +79429,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" @@ -70134,6 +79563,9 @@ const ( // ArchitectureValuesX8664 is a ArchitectureValues enum value ArchitectureValuesX8664 = "x86_64" + + // ArchitectureValuesArm64 is a ArchitectureValues enum value + ArchitectureValuesArm64 = "arm64" ) const ( @@ -70150,6 +79582,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" @@ -70218,6 +79658,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" @@ -70249,6 +79712,65 @@ 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 ( // ConnectionNotificationStateEnabled is a ConnectionNotificationState enum value ConnectionNotificationStateEnabled = "Enabled" @@ -70294,6 +79816,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" @@ -70335,6 +79873,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" @@ -70356,6 +79902,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" @@ -70487,6 +80041,9 @@ const ( // FleetTypeMaintain is a FleetType enum value FleetTypeMaintain = "maintain" + + // FleetTypeInstant is a FleetType enum value + FleetTypeInstant = "instant" ) const ( @@ -70683,6 +80240,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" @@ -70691,6 +80256,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" @@ -70871,6 +80444,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" @@ -71033,6 +80624,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" @@ -71078,6 +80687,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" @@ -71117,6 +80729,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" @@ -71173,6 +80803,21 @@ const ( // 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 ( @@ -71183,6 +80828,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" @@ -71555,6 +81208,15 @@ const ( // 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" @@ -71564,6 +81226,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" @@ -71576,6 +81244,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" @@ -71585,8 +81256,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" @@ -71594,6 +81271,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" @@ -71855,6 +81535,133 @@ 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 ( // UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed = "InvalidInstanceID.Malformed" @@ -72050,6 +81857,14 @@ const ( VpcTenancyDefault = "default" ) +const ( + // VpnEcmpSupportValueEnable is a VpnEcmpSupportValue enum value + VpnEcmpSupportValueEnable = "enable" + + // VpnEcmpSupportValueDisable is a VpnEcmpSupportValue enum value + VpnEcmpSupportValueDisable = "disable" +) + const ( // VpnStatePending is a VpnState enum value VpnStatePending = "pending" 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 468c4d455..52ec24bb1 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" @@ -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. +// 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. // -// 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. +// 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%. // -// 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. +// 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,6 +292,97 @@ 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 @@ -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 @@ -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. @@ -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) { @@ -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) { @@ -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. // @@ -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) { @@ -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) { @@ -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) { @@ -1337,6 +1445,94 @@ 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 @@ -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 @@ -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) { @@ -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,6 +2067,98 @@ 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 @@ -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,6 +2612,98 @@ func (c *ECS) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, return p.Err() } +const opPutAccountSetting = "PutAccountSetting" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/PutAccountSetting +func (c *ECS) PutAccountSettingRequest(input *PutAccountSettingInput) (req *request.Request, output *PutAccountSettingOutput) { + op := &request.Operation{ + Name: opPutAccountSetting, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutAccountSettingInput{} + } + + output = &PutAccountSettingOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutAccountSetting 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 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 PutAccountSetting 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/PutAccountSetting +func (c *ECS) PutAccountSetting(input *PutAccountSettingInput) (*PutAccountSettingOutput, error) { + req, out := c.PutAccountSettingRequest(input) + return out, req.Send() +} + +// PutAccountSettingWithContext is the same as PutAccountSetting with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opPutAttributes = "PutAttributes" // PutAttributesRequest generates a "aws/request.Request" representing the @@ -2384,12 +2764,12 @@ func (c *ECS) PutAttributesRequest(input *PutAttributesInput) (req *request.Requ // 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. // // * ErrCodeAttributeLimitExceededException "AttributeLimitExceededException" // You can apply up to 10 custom attributes per resource. You can view the attributes @@ -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) { @@ -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) { @@ -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) { @@ -3140,6 +3520,201 @@ 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 @@ -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 @@ -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) { @@ -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,7 +4357,7 @@ 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"` @@ -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. @@ -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. @@ -4138,7 +4736,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}}' DockerLabels map[string]*string `locationName:"dockerLabels" type:"map"` // A list of strings to provide custom labels for SELinux and AppArmor multi-level @@ -4195,13 +4793,13 @@ 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/#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/). + // 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 @@ -4215,7 +4813,8 @@ type ContainerDefinition struct { // 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 @@ -4283,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/#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 @@ -4304,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 @@ -4329,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. @@ -4337,7 +4936,7 @@ 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 @@ -4349,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 @@ -4435,6 +5034,9 @@ 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/) @@ -4442,8 +5044,10 @@ type ContainerDefinition struct { // // 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. When you do, the container that is started last will - // determine which systemControls parameters take effect. + // 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 @@ -4454,7 +5058,7 @@ type ContainerDefinition struct { // 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"` @@ -4523,6 +5127,16 @@ func (s *ContainerDefinition) Validate() error { invalidParams.AddNested("RepositoryCredentials", err.(request.ErrInvalidParams)) } } + 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]", "Secrets", i), err.(request.ErrInvalidParams)) + } + } + } if s.Ulimits != nil { for i, v := range s.Ulimits { if v == nil { @@ -4702,6 +5316,12 @@ 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 @@ -4765,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 @@ -4797,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 @@ -4893,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 @@ -5054,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 @@ -5066,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"` @@ -5111,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/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 @@ -5149,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 @@ -5198,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, @@ -5227,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. @@ -5259,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 @@ -5289,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 @@ -5337,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 @@ -5361,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 @@ -5371,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"` } @@ -5390,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"` @@ -5619,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 @@ -5633,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 @@ -5643,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"` } @@ -5743,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"` } @@ -5779,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"` @@ -6032,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 @@ -6069,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"` @@ -6109,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. // @@ -6145,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 @@ -6186,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. @@ -6217,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 @@ -6226,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"` } @@ -6240,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 @@ -6254,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 @@ -6289,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 @@ -6388,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 @@ -6453,9 +7441,10 @@ func (s *DiscoverPollEndpointOutput) SetTelemetryEndpoint(v string) *DiscoverPol return s } -// This parameter is specified when using Docker volumes. Docker volumes are -// only supported when using the EC2 launch type. Windows containers only support -// the use of the local driver. To use bind mounts, specify a host instead. +// 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"` @@ -6476,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/). @@ -6488,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. @@ -6579,8 +7568,8 @@ func (s *Failure) SetReason(v string) *Failure { // 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 using platform -// version version 1.1.0 or greater. For more information, see AWS Fargate +// * 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 @@ -6836,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"` } @@ -6896,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 @@ -6984,6 +7973,127 @@ func (s *LinuxParameters) SetTmpfs(v []*Tmpfs) *LinuxParameters { return s } +type ListAccountSettingsInput struct { + _ struct{} `type:"structure"` + + // 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 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 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 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 ListAccountSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAccountSettingsInput) GoString() string { + return s.String() +} + +// SetEffectiveSettings sets the EffectiveSettings field's value. +func (s *ListAccountSettingsInput) SetEffectiveSettings(v bool) *ListAccountSettingsInput { + s.EffectiveSettings = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAccountSettingsInput) SetMaxResults(v int64) *ListAccountSettingsInput { + s.MaxResults = &v + return s +} + +// 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"` @@ -7329,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"` @@ -7422,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"` @@ -7662,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 @@ -7807,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"` @@ -7830,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, @@ -7879,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 @@ -7894,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"` @@ -7903,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"` } @@ -8216,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 @@ -8229,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. @@ -8265,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 @@ -8303,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"` @@ -8410,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"` @@ -8441,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 @@ -8478,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 @@ -8530,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) @@ -8565,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 @@ -8597,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 @@ -8677,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 @@ -8708,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 @@ -8720,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 @@ -8732,6 +10116,12 @@ func (s *RegisterTaskDefinitionInput) SetRequiresCompatibilities(v []*string) *R return s } +// 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 @@ -8747,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"` } @@ -8761,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 @@ -8771,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"` @@ -8892,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/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"` @@ -8920,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 @@ -8942,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. // @@ -8970,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 @@ -8989,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 @@ -9031,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 @@ -9076,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"` @@ -9083,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"` @@ -9098,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/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"` @@ -9107,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 @@ -9116,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 @@ -9135,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. @@ -9149,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: // @@ -9159,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"` @@ -9181,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 @@ -9209,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 @@ -9227,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 @@ -9281,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 @@ -9323,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. @@ -9438,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"` @@ -9453,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/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"` @@ -9473,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 @@ -9484,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. // @@ -9515,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 @@ -9534,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 @@ -9552,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 @@ -9795,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. @@ -9928,15 +11625,23 @@ func (s *SubmitTaskStateChangeOutput) SetAcknowledgment(v string) *SubmitTaskSta // // 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. When you do, the container that is started last will -// determine which systemControls parameters take effect. +// 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 to set a value for. + // The namespaced kernel parameter for which to set a value. Namespace *string `locationName:"namespace" type:"string"` - // The value for the namespaced kernel parameter specifed in namespace. + // The value for the namespaced kernel parameter specified in namespace. Value *string `locationName:"value" type:"string"` } @@ -9962,11 +11667,142 @@ func (s *SystemControl) SetValue(v string) *SystemControl { 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"` @@ -9976,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. @@ -9985,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) @@ -10013,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"` @@ -10021,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. @@ -10044,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. + // 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. 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 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) @@ -10077,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"` @@ -10097,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"` @@ -10117,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"` } @@ -10259,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 @@ -10277,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 @@ -10310,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) @@ -10338,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, @@ -10361,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 @@ -10396,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. @@ -10481,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 @@ -10493,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 @@ -10629,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"` @@ -10765,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"` @@ -10961,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 @@ -10979,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. @@ -11147,22 +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"` - // This parameter is specified when using Docker volumes. Docker volumes are - // only supported when using the EC2 launch type. Windows containers only support - // the use of the local driver. To use bind mounts, specify a host instead. + // 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 @@ -11213,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"` } @@ -11271,6 +13482,9 @@ const ( const ( // ClusterFieldStatistics is a ClusterField enum value ClusterFieldStatistics = "STATISTICS" + + // ClusterFieldTags is a ClusterField enum value + ClusterFieldTags = "TAGS" ) const ( @@ -11289,6 +13503,11 @@ const ( ConnectivityDisconnected = "DISCONNECTED" ) +const ( + // ContainerInstanceFieldTags is a ContainerInstanceField enum value + ContainerInstanceFieldTags = "TAGS" +) + const ( // ContainerInstanceStatusActive is a ContainerInstanceStatus enum value ContainerInstanceStatusActive = "ACTIVE" @@ -11297,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" @@ -11330,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" @@ -11375,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" @@ -11394,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" @@ -11410,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" @@ -11418,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" @@ -11434,6 +13717,11 @@ const ( TaskDefinitionFamilyStatusAll = "ALL" ) +const ( + // TaskDefinitionFieldTags is a TaskDefinitionField enum value + TaskDefinitionFieldTags = "TAGS" +) + const ( // TaskDefinitionPlacementConstraintTypeMemberOf is a TaskDefinitionPlacementConstraintType enum value TaskDefinitionPlacementConstraintTypeMemberOf = "memberOf" @@ -11447,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 5091c3ff3..9a11f23dc 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 f24886fa3..b3ef2782e 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 a4fd7cd49..9190a03d8 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 @@ -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. @@ -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. @@ -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,6 +334,102 @@ 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 @@ -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,6 +1124,148 @@ func (s *DescribeClusterOutput) SetCluster(v *Cluster) *DescribeClusterOutput { return s } +type DescribeUpdateInput struct { + _ struct{} `type:"structure"` + + // 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 ID of the update to describe. + // + // UpdateId is a required field + UpdateId *string `location:"uri" locationName:"updateId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeUpdateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUpdateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DescribeUpdateInput) SetName(v string) *DescribeUpdateInput { + s.Name = &v + return s +} + +// SetUpdateId sets the UpdateId field's value. +func (s *DescribeUpdateInput) SetUpdateId(v string) *DescribeUpdateInput { + s.UpdateId = &v + return s +} + +type DescribeUpdateOutput struct { + _ struct{} `type:"structure"` + + // The full description of the specified update. + Update *Update `locationName:"update" type:"structure"` +} + +// 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"` @@ -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 98a2410c5..b343c7e0b 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 000000000..022255cf0 --- /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 20d01f6df..f0b65981d 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 @@ -1339,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 } @@ -1432,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 } @@ -1525,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 } 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 1f3a76b04..dba975892 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } 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 c4915fbd8..611b16d86 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 @@ -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 } @@ -427,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 } @@ -2073,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 } @@ -3363,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 @@ -4719,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 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 05c07b9f6..ec140ae0b 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" @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 @@ -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 @@ -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 @@ -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)) } @@ -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 ea0bc5937..c1028cae5 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" @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 68b905d3f..b2a0738e3 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" @@ -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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 } @@ -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. + // target group. You can't specify targets for a target group using more than + // one target type. // - // 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. + // * 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. // - // 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. // - // 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 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. // - // With an Application Load Balancer, if the IP address is outside the VPC for - // the target group, the only supported value is all. + // 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 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 66e46254e..cc98bed8e 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } 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 cf22e9cc7..fea196d26 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" @@ -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 } @@ -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 @@ -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. @@ -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,6 +769,215 @@ 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 Firehose +// first sets the status of the stream to ENABLING then to ENABLED. You can +// continue to read and write data to your stream while its status is ENABLING +// but they won't get 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 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 thirteen times +// and StopDeliveryStreamEncryption twelve times for the same 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 Firehose +// first sets the status of the stream to DISABLING 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 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 thirteen times +// and StopDeliveryStreamEncryption twelve times for the same 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 @@ -797,6 +1017,7 @@ 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 } @@ -896,6 +1117,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 } @@ -989,6 +1211,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 +1511,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 +1542,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 +1575,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 +1640,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 +1811,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 +1882,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 +1936,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"` @@ -3186,7 +3472,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 +4250,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 +4277,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 +4403,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 +4422,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 +4439,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 +4496,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 +4530,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 +4713,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 +4800,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 +4827,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 @@ -5582,6 +5890,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 +6391,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 16eb63e6f..61cdda7a7 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 @@ -52,8 +52,7 @@ 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 } @@ -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 } @@ -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 } @@ -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 } @@ -1047,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 } 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 d77230940..60d1aca41 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 09929920d..f6199352f 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 93bfbb1ee..b27419748 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" @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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,6 +2391,98 @@ 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -4160,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. @@ -4254,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. @@ -5221,6 +5342,94 @@ 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 @@ -6383,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 } @@ -6465,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 } @@ -6513,6 +6724,97 @@ 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 @@ -6640,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 } @@ -6726,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 } @@ -7007,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 } @@ -7095,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 } @@ -7275,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 } @@ -7364,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 } @@ -7455,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 } @@ -7547,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 } @@ -7638,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 } @@ -7729,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 } @@ -7911,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 } @@ -8002,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 } @@ -8190,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 } @@ -8770,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"` @@ -9687,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. // @@ -9906,6 +10227,78 @@ func (s *ConnectionInput) SetPhysicalConnectionRequirements(v *PhysicalConnectio 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 +} + +// SetAwsKmsKeyId sets the AwsKmsKeyId field's value. +func (s *ConnectionPasswordEncryption) SetAwsKmsKeyId(v string) *ConnectionPasswordEncryption { + s.AwsKmsKeyId = &v + return s +} + +// SetReturnConnectionPasswordEncrypted sets the ReturnConnectionPasswordEncrypted field's value. +func (s *ConnectionPasswordEncryption) SetReturnConnectionPasswordEncrypted(v bool) *ConnectionPasswordEncryption { + s.ReturnConnectionPasswordEncrypted = &v + return s +} + // Specifies the connections used by a job. type ConnectionsList struct { _ struct{} `type:"structure"` @@ -9940,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 @@ -10401,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. @@ -11976,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"` } @@ -11993,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)) @@ -12005,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 @@ -12610,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"` @@ -12770,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"` @@ -13045,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 @@ -13655,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 @@ -13696,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 @@ -13770,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"` @@ -13815,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 @@ -15060,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. @@ -15326,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"` @@ -15581,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"` } @@ -17962,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"` @@ -19109,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. @@ -19297,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. @@ -19439,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"` } @@ -19475,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"` } @@ -19865,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. @@ -21211,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" @@ -21266,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 6de7b4f0e..a1e9b4d4d 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 88975389b..59239f04d 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" @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -3906,6 +3921,9 @@ 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")) } @@ -4145,6 +4163,9 @@ 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")) } @@ -4503,6 +4524,9 @@ 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")) } @@ -4635,6 +4659,9 @@ func (s *CreateIPSetInput) 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.Format == nil { invalidParams.Add(request.NewErrParamRequired("Format")) } @@ -4744,6 +4771,9 @@ func (s *CreateMembersInput) 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.AccountDetails != nil { for i, v := range s.AccountDetails { if v == nil { @@ -4825,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 @@ -4910,6 +4943,9 @@ func (s *CreateThreatIntelSetInput) 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.Format == nil { invalidParams.Add(request.NewErrParamRequired("Format")) } @@ -5074,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 @@ -5127,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 @@ -5189,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 @@ -5322,6 +5373,9 @@ func (s *DeleteMembersInput) 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 @@ -5392,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 @@ -5451,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 @@ -5511,6 +5574,9 @@ func (s *DisassociateMembersInput) 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 @@ -5872,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 @@ -5971,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 @@ -6087,6 +6162,9 @@ 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")) } @@ -6171,6 +6249,9 @@ 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")) } @@ -6249,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 @@ -6385,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 @@ -6454,6 +6544,9 @@ func (s *GetMembersInput) 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 @@ -6533,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 @@ -6856,6 +6955,9 @@ func (s *InviteMembersInput) 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 @@ -7022,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)) } @@ -7126,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)) } @@ -7231,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)) } @@ -7407,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)) } @@ -7506,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)) } @@ -8435,6 +8552,9 @@ func (s *StartMonitoringMembersInput) 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 @@ -8512,6 +8632,9 @@ func (s *StopMonitoringMembersInput) 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 @@ -8618,6 +8741,9 @@ 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")) } @@ -8723,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 @@ -8803,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 @@ -8910,6 +9045,9 @@ 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")) } @@ -8997,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 @@ -9089,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 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 cb3280a79..f91e30b57 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 } @@ -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 @@ -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 @@ -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 @@ -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. @@ -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 @@ -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. @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. @@ -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 @@ -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 @@ -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 @@ -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) { @@ -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 @@ -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 @@ -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) { @@ -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 @@ -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. @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -5032,6 +5019,139 @@ 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 @@ -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) { @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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,6 +7015,230 @@ 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -9174,6 +9518,124 @@ func (c *IAM) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesI return p.Err() } +const opListPoliciesGrantingServiceAccess = "ListPoliciesGrantingServiceAccess" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/ListPoliciesGrantingServiceAccess +func (c *IAM) ListPoliciesGrantingServiceAccessRequest(input *ListPoliciesGrantingServiceAccessInput) (req *request.Request, output *ListPoliciesGrantingServiceAccessOutput) { + op := &request.Operation{ + Name: opListPoliciesGrantingServiceAccess, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListPoliciesGrantingServiceAccessInput{} + } + + output = &ListPoliciesGrantingServiceAccessOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPoliciesGrantingServiceAccess API operation for AWS Identity and Access Management. +// +// Retrieves a list of policies that the IAM identity (user, group, or role) +// can use to access each specified service. +// +// 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 ListPoliciesGrantingServiceAccess 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/ListPoliciesGrantingServiceAccess +func (c *IAM) ListPoliciesGrantingServiceAccess(input *ListPoliciesGrantingServiceAccessInput) (*ListPoliciesGrantingServiceAccessOutput, error) { + req, out := c.ListPoliciesGrantingServiceAccessRequest(input) + return out, req.Send() +} + +// 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 @@ -9240,8 +9702,8 @@ func (c *IAM) ListPolicyVersionsRequest(input *ListPolicyVersionsInput) (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 @@ -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,6 +9935,93 @@ 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 @@ -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) { @@ -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. @@ -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 @@ -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,6 +10922,93 @@ 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) { @@ -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 @@ -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 @@ -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,6 +12733,451 @@ func (c *IAM) SimulatePrincipalPolicyPagesWithContext(ctx aws.Context, input *Si return p.Err() } +const opTagRole = "TagRole" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/TagRole +func (c *IAM) TagRoleRequest(input *TagRoleInput) (req *request.Request, output *TagRoleOutput) { + op := &request.Operation{ + Name: opTagRole, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagRoleInput{} + } + + output = &TagRoleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagRole API operation for AWS Identity and Access Management. +// +// 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. +// +// 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 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 +// 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 TagRole 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/TagRole +func (c *IAM) TagRole(input *TagRoleInput) (*TagRoleOutput, error) { + req, out := c.TagRoleRequest(input) + return out, req.Send() +} + +// TagRoleWithContext is the same as TagRole with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opTagUser = "TagUser" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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 @@ -12146,8 +13217,7 @@ func (c *IAM) UpdateAccessKeyRequest(input *UpdateAccessKeyInput) (req *request. output = &UpdateAccessKeyOutput{} 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 } @@ -12158,10 +13228,10 @@ func (c *IAM) UpdateAccessKeyRequest(input *UpdateAccessKeyInput) (req *request. // 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. 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. // // 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. @@ -12175,8 +13245,8 @@ func (c *IAM) UpdateAccessKeyRequest(input *UpdateAccessKeyInput) (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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) { @@ -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 @@ -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) { @@ -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 @@ -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. @@ -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 @@ -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 @@ -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 @@ -18364,12 +19651,79 @@ func (s *GenerateCredentialReportOutput) SetState(v string) *GenerateCredentialR 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"` + + // 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 GenerateServiceLastAccessedDetailsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GenerateServiceLastAccessedDetailsOutput) GoString() string { + return s.String() +} + +// SetJobId sets the JobId field's value. +func (s *GenerateServiceLastAccessedDetailsOutput) SetJobId(v string) *GenerateServiceLastAccessedDetailsOutput { + s.JobId = &v + return s +} + type GetAccessKeyLastUsedInput struct { _ struct{} `type:"structure"` // 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,7 +24508,7 @@ 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 @@ -22648,6 +24549,138 @@ func (s *ListRolePoliciesOutput) SetPolicyNames(v []*string) *ListRolePoliciesOu 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"` + + // 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. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListRoleTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRoleTagsOutput) GoString() string { + return s.String() +} + +// SetIsTruncated sets the IsTruncated field's value. +func (s *ListRoleTagsOutput) SetIsTruncated(v bool) *ListRoleTagsOutput { + s.IsTruncated = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListRoleTagsOutput) SetMarker(v string) *ListRoleTagsOutput { + s.Marker = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListRoleTagsOutput) SetTags(v []*Tag) *ListRoleTagsOutput { + s.Tags = v + return s +} + type ListRolesInput struct { _ struct{} `type:"structure"` @@ -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,6 +25434,138 @@ func (s *ListUserPoliciesOutput) SetPolicyNames(v []*string) *ListUserPoliciesOu return s } +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 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 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"` @@ -23410,22 +25575,22 @@ type ListUsersInput 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: /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. // @@ -26110,6 +28381,94 @@ func (s *ServerCertificateMetadata) SetUploadDate(v time.Time) *ServerCertificat 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 +} + +// SetLastAuthenticatedEntity sets the LastAuthenticatedEntity field's value. +func (s *ServiceLastAccessed) SetLastAuthenticatedEntity(v string) *ServiceLastAccessed { + s.LastAuthenticatedEntity = &v + return s +} + +// SetServiceName sets the ServiceName field's value. +func (s *ServiceLastAccessed) SetServiceName(v string) *ServiceLastAccessed { + s.ServiceName = &v + return s +} + +// SetServiceNamespace sets the ServiceNamespace field's value. +func (s *ServiceLastAccessed) SetServiceNamespace(v string) *ServiceLastAccessed { + s.ServiceNamespace = &v + return s +} + +// SetTotalAuthenticatedEntities sets the TotalAuthenticatedEntities field's value. +func (s *ServiceLastAccessed) SetTotalAuthenticatedEntities(v int64) *ServiceLastAccessed { + s.TotalAuthenticatedEntities = &v + return s +} + // Contains the details of a service-specific credential. type ServiceSpecificCredential struct { _ struct{} `type:"structure"` @@ -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 @@ -27106,12 +29465,396 @@ func (s *Statement) SetStartPosition(v *Position) *Statement { 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 TagRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagRoleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagRoleInput"} + 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.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 +} + +// 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.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 +} + +// SetTags sets the Tags field's value. +func (s *TagUserInput) SetTags(v []*Tag) *TagUserInput { + s.Tags = v + return s +} + +// SetUserName sets the UserName field's value. +func (s *TagUserInput) SetUserName(v string) *TagUserInput { + s.UserName = &v + return s +} + +type TagUserOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagUserOutput) GoString() string { + return s.String() +} + +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"` +} + +// String returns the string representation +func (s UntagRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagRoleInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetRoleName sets the RoleName field's value. +func (s *UntagRoleInput) SetRoleName(v string) *UntagRoleInput { + s.RoleName = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagRoleInput) SetTagKeys(v []*string) *UntagRoleInput { + s.TagKeys = v + return s +} + +type UntagRoleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagRoleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagRoleOutput) GoString() string { + return s.String() +} + +type UntagUserInput struct { + _ struct{} `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 UntagUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagUserInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagUserInput) SetTagKeys(v []*string) *UntagUserInput { + s.TagKeys = v + return s +} + +// SetUserName sets the UserName field's value. +func (s *UntagUserInput) SetUserName(v string) *UntagUserInput { + s.UserName = &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 { _ struct{} `type:"structure"` // 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 470e19b37..8c1773fcc 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 9d5c5ce9e..b05d86441 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 b388b6cc4..9cf125993 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 @@ -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,6 +113,92 @@ 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -1243,6 +1329,91 @@ 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 @@ -1372,6 +1543,100 @@ 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 @@ -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() @@ -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 } @@ -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,6 +3040,93 @@ 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 @@ -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 } @@ -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,6 +3325,93 @@ 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 @@ -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() @@ -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 } @@ -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 } @@ -4707,6 +5160,91 @@ 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 @@ -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 } @@ -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 } @@ -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 } @@ -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. @@ -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() @@ -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() @@ -7975,6 +8522,91 @@ 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 @@ -9666,6 +10298,91 @@ 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 @@ -10450,6 +11167,91 @@ 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 @@ -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,6 +11994,92 @@ 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 @@ -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 } @@ -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() @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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,6 +13061,96 @@ 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 @@ -12474,6 +13452,92 @@ 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 @@ -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 } @@ -12652,6 +13717,95 @@ 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 @@ -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 } @@ -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,6 +13999,98 @@ 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 @@ -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 } @@ -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,6 +14263,92 @@ 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 @@ -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 } @@ -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 } @@ -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 @@ -16711,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)) @@ -16728,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 @@ -16764,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 @@ -17576,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 @@ -17651,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"` @@ -17834,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 @@ -17878,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 @@ -17941,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 @@ -17963,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")) } @@ -17985,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 @@ -18043,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 @@ -18080,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 @@ -18352,6 +20335,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"` @@ -18476,6 +20525,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"` @@ -18825,6 +20938,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 @@ -19766,6 +21882,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"` @@ -20110,9 +22335,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 and shadow 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_AND_CONNECTIVITY_STATUS - Your thing index will + // contain registry data, shadow data, and thing connectivity status data. Schema *string `locationName:"schema" type:"string"` } @@ -20726,6 +22958,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"` @@ -20755,6 +22999,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 @@ -20840,6 +23108,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"` @@ -20879,6 +23150,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 @@ -20940,6 +23217,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 @@ -22020,6 +24300,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"` @@ -22593,6 +24956,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 @@ -22971,10 +25337,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"` @@ -23009,6 +25445,9 @@ type Job struct { // Configuration for pre-signed S3 URLs. PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` + // 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"` @@ -23041,6 +25480,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 @@ -23107,6 +25552,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 @@ -23137,7 +25588,10 @@ type JobExecution struct { _ struct{} `type:"structure"` // The estimated number of seconds that remain before the job execution status - // will be changed to TIMED_OUT. + // 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 @@ -23410,6 +25864,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"` @@ -23431,6 +25889,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 @@ -23438,6 +25901,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 @@ -23641,7 +26110,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"` @@ -23910,6 +26379,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 @@ -24331,6 +26803,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"` @@ -26097,6 +28659,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"` @@ -26600,6 +29242,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 @@ -26852,6 +29497,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"` @@ -28151,6 +30891,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"` @@ -28617,6 +31409,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"` @@ -29631,6 +32503,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 @@ -30344,6 +33219,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 @@ -30603,6 +33481,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"` @@ -30989,6 +33966,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"` @@ -30996,6 +34009,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"` @@ -31028,6 +34044,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 @@ -31232,10 +34254,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. @@ -31272,6 +34304,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 @@ -31418,14 +34456,11 @@ type TimeoutConfig struct { _ struct{} `type:"structure"` // Specifies the amount of time, in minutes, this device has to finish execution - // of this job. A timer is started, or restarted, whenever this job's execution - // status is specified as IN_PROGRESS with this field populated. If the job - // execution status is not set to a terminal state before the timer expires, - // or before another job execution status update is sent with this field populated, - // the status will be automatically set to TIMED_OUT. Note that setting/resetting - // this timer has no effect on the job execution timeout timer which may have - // been specified when the job was created (CreateJobExecution using the field - // timeoutConfig). + // 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"` } @@ -31852,6 +34887,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"` @@ -32057,6 +35158,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"` @@ -32236,6 +35426,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"` @@ -32339,6 +35654,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"` @@ -32959,6 +36392,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"` @@ -32992,6 +36431,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 @@ -33310,6 +36755,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" @@ -33535,6 +36985,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" @@ -33589,6 +37050,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" @@ -33729,6 +37204,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 7b3cdcf26..2cdb06a0f 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } 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 000000000..dfcfe3529 --- /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 000000000..8e2c78113 --- /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 000000000..7091938f1 --- /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 000000000..153daad6e --- /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 540480c7c..e669ba46f 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 @@ -123,6 +123,172 @@ 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 @@ -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,6 +424,203 @@ 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 @@ -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) @@ -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) @@ -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,6 +1146,144 @@ 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 @@ -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,6 +1402,116 @@ 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 @@ -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 @@ -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 } @@ -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,6 +1833,125 @@ 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 @@ -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) @@ -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. @@ -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. // -// 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. +// 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. // -// 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. +// 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. +// +// 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. @@ -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) @@ -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) @@ -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) @@ -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) @@ -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 } @@ -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. // @@ -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 } @@ -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 } @@ -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) @@ -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 } @@ -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 } @@ -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,6 +4990,204 @@ 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 @@ -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 @@ -4856,6 +6075,125 @@ func (s *CreateKeyOutput) SetKeyMetadata(v *KeyMetadata) *CreateKeyOutput { 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 +} + type DecryptInput struct { _ struct{} `type:"structure"` @@ -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 cc3620ac7..fad9002e1 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 2a6511da9..e41edf66d 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 2bea0f2fa..fbbb32e8a 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,6 +13,114 @@ 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 @@ -270,31 +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. 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. +// * Using AWS Lambda with Amazon SQS (http://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html) // -// You can configure an SQS queue in an account separate from your Lambda function's -// account. Also the queue needs to reside in the same AWS region as your 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). -// -// 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 @@ -484,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 } @@ -581,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 @@ -676,8 +764,7 @@ 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 } @@ -776,8 +863,7 @@ 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 } @@ -831,6 +917,91 @@ 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 @@ -1053,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 @@ -1307,6 +1475,190 @@ func (c *Lambda) GetFunctionConfigurationWithContext(ctx aws.Context, input *Get return out, req.Send() } +const opGetLayerVersion = "GetLayerVersion" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetLayerVersion +func (c *Lambda) GetLayerVersionRequest(input *GetLayerVersionInput) (req *request.Request, output *GetLayerVersionOutput) { + op := &request.Operation{ + Name: opGetLayerVersion, + HTTPMethod: "GET", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}", + } + + if input == nil { + input = &GetLayerVersionInput{} + } + + output = &GetLayerVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLayerVersion API operation for AWS Lambda. +// +// 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 GetLayerVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * 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 +// +// * 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() +} + +// GetLayerVersionWithContext is the same as GetLayerVersion with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetLayerVersionPolicy = "GetLayerVersionPolicy" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetLayerVersionPolicy +func (c *Lambda) GetLayerVersionPolicyRequest(input *GetLayerVersionPolicyInput) (req *request.Request, output *GetLayerVersionPolicyOutput) { + op := &request.Operation{ + Name: opGetLayerVersionPolicy, + HTTPMethod: "GET", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy", + } + + if input == nil { + input = &GetLayerVersionPolicyInput{} + } + + output = &GetLayerVersionPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLayerVersionPolicy API operation for AWS Lambda. +// +// 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 GetLayerVersionPolicy 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/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. +// +// See GetLayerVersionPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the 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 @@ -1824,14 +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. -// -// 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 @@ -2079,6 +2425,188 @@ func (c *Lambda) ListFunctionsPagesWithContext(ctx aws.Context, input *ListFunct return p.Err() } +const opListLayerVersions = "ListLayerVersions" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/ListLayerVersions +func (c *Lambda) ListLayerVersionsRequest(input *ListLayerVersionsInput) (req *request.Request, output *ListLayerVersionsOutput) { + op := &request.Operation{ + Name: opListLayerVersions, + HTTPMethod: "GET", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions", + } + + if input == nil { + input = &ListLayerVersionsInput{} + } + + output = &ListLayerVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLayerVersions API operation for AWS Lambda. +// +// 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 ListLayerVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * 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/ListLayerVersions +func (c *Lambda) ListLayerVersions(input *ListLayerVersionsInput) (*ListLayerVersionsOutput, error) { + req, out := c.ListLayerVersionsRequest(input) + return out, req.Send() +} + +// ListLayerVersionsWithContext is the same as ListLayerVersions with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opListLayers = "ListLayers" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/ListLayers +func (c *Lambda) ListLayersRequest(input *ListLayersInput) (req *request.Request, output *ListLayersOutput) { + op := &request.Operation{ + Name: opListLayers, + HTTPMethod: "GET", + HTTPPath: "/2018-10-31/layers", + } + + if input == nil { + input = &ListLayersInput{} + } + + output = &ListLayersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLayers API operation for AWS Lambda. +// +// 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 ListLayers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * 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/ListLayers +func (c *Lambda) ListLayers(input *ListLayersInput) (*ListLayersOutput, error) { + req, out := c.ListLayersRequest(input) + return out, req.Send() +} + +// ListLayersWithContext is the same as ListLayers with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the @@ -2265,6 +2793,103 @@ func (c *Lambda) ListVersionsByFunctionWithContext(ctx aws.Context, input *ListV return out, req.Send() } +const opPublishLayerVersion = "PublishLayerVersion" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/PublishLayerVersion +func (c *Lambda) PublishLayerVersionRequest(input *PublishLayerVersionInput) (req *request.Request, output *PublishLayerVersionOutput) { + op := &request.Operation{ + Name: opPublishLayerVersion, + HTTPMethod: "POST", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions", + } + + if input == nil { + input = &PublishLayerVersionInput{} + } + + output = &PublishLayerVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// PublishLayerVersion API operation for AWS Lambda. +// +// Creates a function layer from a ZIP archive. Each time you call PublishLayerVersion +// with the same version name, a new version is created. +// +// 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 PublishLayerVersion 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. +// +// * 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/PublishLayerVersion +func (c *Lambda) PublishLayerVersion(input *PublishLayerVersionInput) (*PublishLayerVersionOutput, error) { + req, out := c.PublishLayerVersionRequest(input) + return out, req.Send() +} + +// PublishLayerVersionWithContext is the same as PublishLayerVersion with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opPublishVersion = "PublishVersion" // PublishVersionRequest generates a "aws/request.Request" representing the @@ -2464,6 +3089,104 @@ func (c *Lambda) PutFunctionConcurrencyWithContext(ctx aws.Context, input *PutFu return out, req.Send() } +const opRemoveLayerVersionPermission = "RemoveLayerVersionPermission" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/RemoveLayerVersionPermission +func (c *Lambda) RemoveLayerVersionPermissionRequest(input *RemoveLayerVersionPermissionInput) (req *request.Request, output *RemoveLayerVersionPermissionOutput) { + op := &request.Operation{ + Name: opRemoveLayerVersionPermission, + HTTPMethod: "DELETE", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}", + } + + if input == nil { + input = &RemoveLayerVersionPermissionInput{} + } + + output = &RemoveLayerVersionPermissionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveLayerVersionPermission API operation for AWS Lambda. +// +// 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 RemoveLayerVersionPermission 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/RemoveLayerVersionPermission +func (c *Lambda) RemoveLayerVersionPermission(input *RemoveLayerVersionPermissionInput) (*RemoveLayerVersionPermissionOutput, error) { + req, out := c.RemoveLayerVersionPermissionRequest(input) + return out, req.Send() +} + +// RemoveLayerVersionPermissionWithContext is the same as RemoveLayerVersionPermission with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the @@ -2503,8 +3226,7 @@ func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *req output = &RemovePermissionOutput{} 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 } @@ -2613,8 +3335,7 @@ func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Reque 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 } @@ -2710,8 +3431,7 @@ func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.R 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 } @@ -2910,18 +3630,8 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping // 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. -// -// 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. -// -// This operation requires permission for the lambda:UpdateEventSourceMapping -// action. +// 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 @@ -3294,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"` @@ -3309,7 +4172,7 @@ type AddPermissionInput struct { // This is currently only used for Alexa Smart Home functions. EventSourceToken *string `type:"string"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -3694,22 +4557,30 @@ 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. Both the default and maximum for Amazon SQS are - // 10 messages. + // 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"` - // Set to false to disable the event source upon creation. + // Disables the event source mapping to pause polling and invocation. Enabled *bool `type:"boolean"` // 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 name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -3722,24 +4593,18 @@ type CreateEventSourceMappingInput struct { // * 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. + // 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"` } @@ -3830,7 +4695,7 @@ type CreateFunctionInput struct { // Environment variables that are accessible from function code during execution. Environment *Environment `type:"structure"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -3856,6 +4721,10 @@ type CreateFunctionInput struct { // If not provided, AWS Lambda will use a default service key. 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 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. @@ -3985,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 @@ -4144,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"` @@ -4166,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 @@ -4182,7 +5060,7 @@ func (s *DeleteEventSourceMappingInput) SetUUID(v string) *DeleteEventSourceMapp type DeleteFunctionConcurrencyInput struct { _ struct{} `type:"structure"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -4248,7 +5126,7 @@ func (s DeleteFunctionConcurrencyOutput) GoString() string { type DeleteFunctionInput struct { _ struct{} `type:"structure"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -4324,12 +5202,81 @@ func (s DeleteFunctionOutput) GoString() string { return s.String() } +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"` // Environment variable key-value pairs. - Variables map[string]*string `type:"map"` + Variables map[string]*string `type:"map" sensitive:"true"` } // String returns the string representation @@ -4356,7 +5303,7 @@ type EnvironmentError struct { ErrorCode *string `type:"string"` // The error message. - Message *string `type:"string"` + Message *string `type:"string" sensitive:"true"` } // String returns the string representation @@ -4389,7 +5336,7 @@ type EnvironmentResponse struct { Error *EnvironmentError `type:"structure"` // Environment variable key-value pairs. - Variables map[string]*string `type:"map"` + Variables map[string]*string `type:"map" sensitive:"true"` } // String returns the string representation @@ -4414,40 +5361,34 @@ func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentRes return s } -// Describes mapping between an Amazon Kinesis or DynamoDB stream 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 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. This - // value will be null if an SQS queue is the event source. + // 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"` } @@ -4527,7 +5468,7 @@ type FunctionCode struct { // 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 @@ -4650,9 +5591,12 @@ type FunctionConfiguration struct { KMSKeyArn *string `type:"string"` // 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:ssTZD). + // (https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ss.sTZD). LastModified *string `type:"string"` + // 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"` @@ -4752,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 @@ -4924,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"` @@ -4946,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 @@ -4962,7 +5915,7 @@ func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInp type GetFunctionConfigurationInput struct { _ struct{} `type:"structure"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -5027,7 +5980,7 @@ func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfi type GetFunctionInput struct { _ struct{} `type:"structure"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -5143,6 +6096,235 @@ 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"` @@ -5248,7 +6430,7 @@ func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput { type InvokeAsyncInput struct { _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -5353,7 +6535,7 @@ type InvokeInput struct { // invocation type. ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -5388,7 +6570,7 @@ 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"` // Specify a version or alias to invoke a published version of the function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` @@ -5487,7 +6669,7 @@ type InvokeOutput struct { // 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"` + 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 @@ -5536,6 +6718,266 @@ func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { 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) +} + +// GoString returns the string representation +func (s LayerVersionsListItem) GoString() string { + return s.String() +} + +// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. +func (s *LayerVersionsListItem) SetCompatibleRuntimes(v []*string) *LayerVersionsListItem { + s.CompatibleRuntimes = v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *LayerVersionsListItem) SetCreatedDate(v string) *LayerVersionsListItem { + s.CreatedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *LayerVersionsListItem) SetDescription(v string) *LayerVersionsListItem { + s.Description = &v + return s +} + +// SetLayerVersionArn sets the LayerVersionArn field's value. +func (s *LayerVersionsListItem) SetLayerVersionArn(v string) *LayerVersionsListItem { + s.LayerVersionArn = &v + return s +} + +// SetLicenseInfo sets the LicenseInfo field's value. +func (s *LayerVersionsListItem) SetLicenseInfo(v string) *LayerVersionsListItem { + s.LicenseInfo = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *LayerVersionsListItem) SetVersion(v int64) *LayerVersionsListItem { + s.Version = &v + return s +} + +// Details about a function layer. +type LayersListItem struct { + _ struct{} `type:"structure"` + + // The newest version of the layer. + LatestMatchingVersion *LayerVersionsListItem `type:"structure"` + + // The Amazon Resource Name (ARN) of the function layer. + LayerArn *string `min:"1" type:"string"` + + // The name of the layer. + LayerName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s LayersListItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LayersListItem) GoString() string { + return s.String() +} + +// SetLatestMatchingVersion sets the LatestMatchingVersion field's value. +func (s *LayersListItem) SetLatestMatchingVersion(v *LayerVersionsListItem) *LayersListItem { + s.LatestMatchingVersion = v + return s +} + +// SetLayerArn sets the LayerArn field's value. +func (s *LayersListItem) SetLayerArn(v string) *LayersListItem { + s.LayerArn = &v + return s +} + +// 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"` @@ -5660,11 +7102,16 @@ 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. - // (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. + // The name of the Lambda function. // // Name formats // @@ -5677,16 +7124,13 @@ type ListEventSourceMappingsInput struct { // * 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. + // 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"` } @@ -5740,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"` } @@ -5875,6 +7319,195 @@ func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput { 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 ListLayersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLayersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLayersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLayersInput"} + 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 *ListLayersInput) SetCompatibleRuntime(v string) *ListLayersInput { + s.CompatibleRuntime = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListLayersInput) SetMarker(v string) *ListLayersInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListLayersInput) SetMaxItems(v int64) *ListLayersInput { + s.MaxItems = &v + return s +} + +type ListLayersOutput struct { + _ struct{} `type:"structure"` + + // A list of function layers. + Layers []*LayersListItem `type:"list"` + + // A pagination token returned when the response doesn't contain all layers. + NextMarker *string `type:"string"` +} + +// String returns the string representation +func (s ListLayersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLayersOutput) GoString() string { + return s.String() +} + +// 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 *ListLayersOutput) SetNextMarker(v string) *ListLayersOutput { + s.NextMarker = &v + return s +} + type ListTagsInput struct { _ struct{} `type:"structure"` @@ -5902,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 @@ -6047,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"` @@ -6138,7 +7956,7 @@ func (s *PublishVersionInput) SetRevisionId(v string) *PublishVersionInput { type PutFunctionConcurrencyInput struct { _ struct{} `type:"structure"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -6225,10 +8043,106 @@ 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"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -6368,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")) } @@ -6486,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")) } @@ -6640,16 +8560,19 @@ func (s *UpdateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *Updat type UpdateEventSourceMappingInput 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. + // + // * 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 name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -6662,10 +8585,10 @@ type UpdateEventSourceMappingInput struct { // * 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. + // 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"` @@ -6693,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 @@ -6735,7 +8661,7 @@ type UpdateFunctionCodeInput struct { // returned in the response. DryRun *bool `type:"boolean"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -6780,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 @@ -6881,7 +8807,7 @@ type UpdateFunctionConfigurationInput struct { // The parent object that contains your environment's configuration settings. Environment *Environment `type:"structure"` - // The name of the lambda function. + // The name of the Lambda function. // // Name formats // @@ -6906,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, @@ -7009,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 @@ -7183,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" @@ -7197,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/lexmodelbuildingservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go index fd12663b8..39ce69d1e 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 708ce92e4..47e0f353d 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" @@ -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. @@ -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. @@ -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. @@ -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,6 +662,223 @@ 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 @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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 @@ -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. @@ -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 @@ -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. @@ -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,6 +2096,336 @@ func (c *Lightsail) CreateLoadBalancerTlsCertificateWithContext(ctx aws.Context, return out, req.Send() } +const opCreateRelationalDatabase = "CreateRelationalDatabase" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/CreateRelationalDatabase +func (c *Lightsail) CreateRelationalDatabaseRequest(input *CreateRelationalDatabaseInput) (req *request.Request, output *CreateRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opCreateRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRelationalDatabaseInput{} + } + + output = &CreateRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRelationalDatabase API operation for Amazon Lightsail. +// +// Creates a new database in Amazon Lightsail. +// +// 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 CreateRelationalDatabase 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/CreateRelationalDatabase +func (c *Lightsail) CreateRelationalDatabase(input *CreateRelationalDatabaseInput) (*CreateRelationalDatabaseOutput, error) { + req, out := c.CreateRelationalDatabaseRequest(input) + return out, req.Send() +} + +// CreateRelationalDatabaseWithContext is the same as CreateRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opCreateRelationalDatabaseFromSnapshot = "CreateRelationalDatabaseFromSnapshot" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/CreateRelationalDatabaseFromSnapshot +func (c *Lightsail) CreateRelationalDatabaseFromSnapshotRequest(input *CreateRelationalDatabaseFromSnapshotInput) (req *request.Request, output *CreateRelationalDatabaseFromSnapshotOutput) { + op := &request.Operation{ + Name: opCreateRelationalDatabaseFromSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRelationalDatabaseFromSnapshotInput{} + } + + output = &CreateRelationalDatabaseFromSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRelationalDatabaseFromSnapshot API operation for Amazon Lightsail. +// +// Creates a new database from an existing database snapshot in Amazon Lightsail. +// +// 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 CreateRelationalDatabaseFromSnapshot 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/CreateRelationalDatabaseFromSnapshot +func (c *Lightsail) CreateRelationalDatabaseFromSnapshot(input *CreateRelationalDatabaseFromSnapshotInput) (*CreateRelationalDatabaseFromSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseFromSnapshotRequest(input) + return out, req.Send() +} + +// CreateRelationalDatabaseFromSnapshotWithContext is the same as CreateRelationalDatabaseFromSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opCreateRelationalDatabaseSnapshot = "CreateRelationalDatabaseSnapshot" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/CreateRelationalDatabaseSnapshot +func (c *Lightsail) CreateRelationalDatabaseSnapshotRequest(input *CreateRelationalDatabaseSnapshotInput) (req *request.Request, output *CreateRelationalDatabaseSnapshotOutput) { + op := &request.Operation{ + Name: opCreateRelationalDatabaseSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRelationalDatabaseSnapshotInput{} + } + + output = &CreateRelationalDatabaseSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRelationalDatabaseSnapshot API operation for Amazon Lightsail. +// +// 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 CreateRelationalDatabaseSnapshot 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/CreateRelationalDatabaseSnapshot +func (c *Lightsail) CreateRelationalDatabaseSnapshot(input *CreateRelationalDatabaseSnapshotInput) (*CreateRelationalDatabaseSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseSnapshotRequest(input) + return out, req.Send() +} + +// CreateRelationalDatabaseSnapshotWithContext is the same as CreateRelationalDatabaseSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opDeleteDisk = "DeleteDisk" // DeleteDiskRequest generates a "aws/request.Request" representing the @@ -1869,6 +2475,10 @@ func (c *Lightsail) DeleteDiskRequest(input *DeleteDiskInput) (req *request.Requ // // 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. @@ -1980,6 +2590,10 @@ func (c *Lightsail) DeleteDiskSnapshotRequest(input *DeleteDiskSnapshotInput) (r // 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. @@ -2084,6 +2698,10 @@ func (c *Lightsail) DeleteDomainRequest(input *DeleteDomainInput) (req *request. // // 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. @@ -2188,6 +2806,10 @@ func (c *Lightsail) DeleteDomainEntryRequest(input *DeleteDomainEntryInput) (req // // 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. @@ -2292,6 +2914,10 @@ func (c *Lightsail) DeleteInstanceRequest(input *DeleteInstanceInput) (req *requ // // 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. @@ -2396,6 +3022,10 @@ func (c *Lightsail) DeleteInstanceSnapshotRequest(input *DeleteInstanceSnapshotI // // 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. @@ -2500,6 +3130,10 @@ func (c *Lightsail) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *reques // // 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. @@ -2606,6 +3240,10 @@ func (c *Lightsail) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (r // Once the load balancer is deleted, you will need to create a new load balancer, // create a new certificate, and verify domain ownership again. // +// 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. @@ -2710,6 +3348,10 @@ func (c *Lightsail) DeleteLoadBalancerTlsCertificateRequest(input *DeleteLoadBal // // 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. @@ -2768,6 +3410,222 @@ func (c *Lightsail) DeleteLoadBalancerTlsCertificateWithContext(ctx aws.Context, return out, req.Send() } +const opDeleteRelationalDatabase = "DeleteRelationalDatabase" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/DeleteRelationalDatabase +func (c *Lightsail) DeleteRelationalDatabaseRequest(input *DeleteRelationalDatabaseInput) (req *request.Request, output *DeleteRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opDeleteRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRelationalDatabaseInput{} + } + + output = &DeleteRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRelationalDatabase API operation for Amazon Lightsail. +// +// 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 DeleteRelationalDatabase 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/DeleteRelationalDatabase +func (c *Lightsail) DeleteRelationalDatabase(input *DeleteRelationalDatabaseInput) (*DeleteRelationalDatabaseOutput, error) { + req, out := c.DeleteRelationalDatabaseRequest(input) + return out, req.Send() +} + +// DeleteRelationalDatabaseWithContext is the same as DeleteRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opDeleteRelationalDatabaseSnapshot = "DeleteRelationalDatabaseSnapshot" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/DeleteRelationalDatabaseSnapshot +func (c *Lightsail) DeleteRelationalDatabaseSnapshotRequest(input *DeleteRelationalDatabaseSnapshotInput) (req *request.Request, output *DeleteRelationalDatabaseSnapshotOutput) { + op := &request.Operation{ + Name: opDeleteRelationalDatabaseSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRelationalDatabaseSnapshotInput{} + } + + output = &DeleteRelationalDatabaseSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRelationalDatabaseSnapshot API operation for Amazon Lightsail. +// +// 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 DeleteRelationalDatabaseSnapshot 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/DeleteRelationalDatabaseSnapshot +func (c *Lightsail) DeleteRelationalDatabaseSnapshot(input *DeleteRelationalDatabaseSnapshotInput) (*DeleteRelationalDatabaseSnapshotOutput, error) { + req, out := c.DeleteRelationalDatabaseSnapshotRequest(input) + return out, req.Send() +} + +// DeleteRelationalDatabaseSnapshotWithContext is the same as DeleteRelationalDatabaseSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opDetachDisk = "DetachDisk" // DetachDiskRequest generates a "aws/request.Request" representing the @@ -2816,6 +3674,10 @@ func (c *Lightsail) DetachDiskRequest(input *DetachDiskInput) (req *request.Requ // 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. @@ -2923,6 +3785,10 @@ func (c *Lightsail) DetachInstancesFromLoadBalancerRequest(input *DetachInstance // 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. @@ -3189,6 +4055,126 @@ func (c *Lightsail) DownloadDefaultKeyPairWithContext(ctx aws.Context, input *Do return out, req.Send() } +const opExportSnapshot = "ExportSnapshot" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/ExportSnapshot +func (c *Lightsail) ExportSnapshotRequest(input *ExportSnapshotInput) (req *request.Request, output *ExportSnapshotOutput) { + op := &request.Operation{ + Name: opExportSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExportSnapshotInput{} + } + + output = &ExportSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportSnapshot API operation for Amazon Lightsail. +// +// 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. +// +// 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 ExportSnapshot 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/ExportSnapshot +func (c *Lightsail) ExportSnapshot(input *ExportSnapshotInput) (*ExportSnapshotOutput, error) { + req, out := c.ExportSnapshotRequest(input) + return out, req.Send() +} + +// ExportSnapshotWithContext is the same as ExportSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetActiveNames = "GetActiveNames" // GetActiveNamesRequest generates a "aws/request.Request" representing the @@ -3505,6 +4491,114 @@ func (c *Lightsail) GetBundlesWithContext(ctx aws.Context, input *GetBundlesInpu return out, req.Send() } +const opGetCloudFormationStackRecords = "GetCloudFormationStackRecords" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetCloudFormationStackRecords +func (c *Lightsail) GetCloudFormationStackRecordsRequest(input *GetCloudFormationStackRecordsInput) (req *request.Request, output *GetCloudFormationStackRecordsOutput) { + op := &request.Operation{ + Name: opGetCloudFormationStackRecords, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCloudFormationStackRecordsInput{} + } + + output = &GetCloudFormationStackRecordsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCloudFormationStackRecords API operation for Amazon Lightsail. +// +// 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 GetCloudFormationStackRecords 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/GetCloudFormationStackRecords +func (c *Lightsail) GetCloudFormationStackRecords(input *GetCloudFormationStackRecordsInput) (*GetCloudFormationStackRecordsOutput, error) { + req, out := c.GetCloudFormationStackRecordsRequest(input) + return out, req.Send() +} + +// GetCloudFormationStackRecordsWithContext is the same as GetCloudFormationStackRecords with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetDisk = "GetDisk" // GetDiskRequest generates a "aws/request.Request" representing the @@ -4139,6 +5233,114 @@ func (c *Lightsail) GetDomainsWithContext(ctx aws.Context, input *GetDomainsInpu return out, req.Send() } +const opGetExportSnapshotRecords = "GetExportSnapshotRecords" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetExportSnapshotRecords +func (c *Lightsail) GetExportSnapshotRecordsRequest(input *GetExportSnapshotRecordsInput) (req *request.Request, output *GetExportSnapshotRecordsOutput) { + op := &request.Operation{ + Name: opGetExportSnapshotRecords, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetExportSnapshotRecordsInput{} + } + + output = &GetExportSnapshotRecordsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetExportSnapshotRecords API operation for Amazon Lightsail. +// +// 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 GetExportSnapshotRecords 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/GetExportSnapshotRecords +func (c *Lightsail) GetExportSnapshotRecords(input *GetExportSnapshotRecordsInput) (*GetExportSnapshotRecordsOutput, error) { + req, out := c.GetExportSnapshotRecordsRequest(input) + return out, req.Send() +} + +// GetExportSnapshotRecordsWithContext is the same as GetExportSnapshotRecords with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetInstance = "GetInstance" // GetInstanceRequest generates a "aws/request.Request" representing the @@ -4291,6 +5493,10 @@ func (c *Lightsail) GetInstanceAccessDetailsRequest(input *GetInstanceAccessDeta // 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. @@ -5972,7 +7178,7 @@ func (c *Lightsail) GetRegionsRequest(input *GetRegionsInput) (req *request.Requ // GetRegions 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. +// 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 @@ -6032,6 +7238,1274 @@ func (c *Lightsail) GetRegionsWithContext(ctx aws.Context, input *GetRegionsInpu return out, req.Send() } +const opGetRelationalDatabase = "GetRelationalDatabase" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetRelationalDatabase +func (c *Lightsail) GetRelationalDatabaseRequest(input *GetRelationalDatabaseInput) (req *request.Request, output *GetRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseInput{} + } + + output = &GetRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabase API operation for Amazon Lightsail. +// +// 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 GetRelationalDatabase 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/GetRelationalDatabase +func (c *Lightsail) GetRelationalDatabase(input *GetRelationalDatabaseInput) (*GetRelationalDatabaseOutput, error) { + req, out := c.GetRelationalDatabaseRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseWithContext is the same as GetRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetRelationalDatabaseBlueprints = "GetRelationalDatabaseBlueprints" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetRelationalDatabaseBlueprints +func (c *Lightsail) GetRelationalDatabaseBlueprintsRequest(input *GetRelationalDatabaseBlueprintsInput) (req *request.Request, output *GetRelationalDatabaseBlueprintsOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseBlueprints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseBlueprintsInput{} + } + + output = &GetRelationalDatabaseBlueprintsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseBlueprints API operation for Amazon Lightsail. +// +// 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 GetRelationalDatabaseBlueprints 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/GetRelationalDatabaseBlueprints +func (c *Lightsail) GetRelationalDatabaseBlueprints(input *GetRelationalDatabaseBlueprintsInput) (*GetRelationalDatabaseBlueprintsOutput, error) { + req, out := c.GetRelationalDatabaseBlueprintsRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseBlueprintsWithContext is the same as GetRelationalDatabaseBlueprints with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetRelationalDatabaseBundles = "GetRelationalDatabaseBundles" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetRelationalDatabaseBundles +func (c *Lightsail) GetRelationalDatabaseBundlesRequest(input *GetRelationalDatabaseBundlesInput) (req *request.Request, output *GetRelationalDatabaseBundlesOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseBundles, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseBundlesInput{} + } + + output = &GetRelationalDatabaseBundlesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseBundles API operation for Amazon Lightsail. +// +// 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 GetRelationalDatabaseBundles 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/GetRelationalDatabaseBundles +func (c *Lightsail) GetRelationalDatabaseBundles(input *GetRelationalDatabaseBundlesInput) (*GetRelationalDatabaseBundlesOutput, error) { + req, out := c.GetRelationalDatabaseBundlesRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseBundlesWithContext is the same as GetRelationalDatabaseBundles with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetRelationalDatabaseEvents = "GetRelationalDatabaseEvents" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetRelationalDatabaseEvents +func (c *Lightsail) GetRelationalDatabaseEventsRequest(input *GetRelationalDatabaseEventsInput) (req *request.Request, output *GetRelationalDatabaseEventsOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseEvents, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseEventsInput{} + } + + output = &GetRelationalDatabaseEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseEvents API operation for Amazon Lightsail. +// +// 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 GetRelationalDatabaseEvents 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/GetRelationalDatabaseEvents +func (c *Lightsail) GetRelationalDatabaseEvents(input *GetRelationalDatabaseEventsInput) (*GetRelationalDatabaseEventsOutput, error) { + req, out := c.GetRelationalDatabaseEventsRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseEventsWithContext is the same as GetRelationalDatabaseEvents with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetRelationalDatabaseLogEvents = "GetRelationalDatabaseLogEvents" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetRelationalDatabaseLogEvents +func (c *Lightsail) GetRelationalDatabaseLogEventsRequest(input *GetRelationalDatabaseLogEventsInput) (req *request.Request, output *GetRelationalDatabaseLogEventsOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseLogEvents, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseLogEventsInput{} + } + + output = &GetRelationalDatabaseLogEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseLogEvents API operation for Amazon Lightsail. +// +// 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 GetRelationalDatabaseLogEvents 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/GetRelationalDatabaseLogEvents +func (c *Lightsail) GetRelationalDatabaseLogEvents(input *GetRelationalDatabaseLogEventsInput) (*GetRelationalDatabaseLogEventsOutput, error) { + req, out := c.GetRelationalDatabaseLogEventsRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseLogEventsWithContext is the same as GetRelationalDatabaseLogEvents with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetRelationalDatabaseLogStreams = "GetRelationalDatabaseLogStreams" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetRelationalDatabaseLogStreams +func (c *Lightsail) GetRelationalDatabaseLogStreamsRequest(input *GetRelationalDatabaseLogStreamsInput) (req *request.Request, output *GetRelationalDatabaseLogStreamsOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseLogStreams, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseLogStreamsInput{} + } + + output = &GetRelationalDatabaseLogStreamsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseLogStreams API operation for Amazon Lightsail. +// +// 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 GetRelationalDatabaseLogStreams 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/GetRelationalDatabaseLogStreams +func (c *Lightsail) GetRelationalDatabaseLogStreams(input *GetRelationalDatabaseLogStreamsInput) (*GetRelationalDatabaseLogStreamsOutput, error) { + req, out := c.GetRelationalDatabaseLogStreamsRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseLogStreamsWithContext is the same as GetRelationalDatabaseLogStreams with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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() +} + +const opGetRelationalDatabaseMasterUserPassword = "GetRelationalDatabaseMasterUserPassword" + +// 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 @@ -6494,6 +8968,10 @@ func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPort // // 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. @@ -6703,6 +9181,10 @@ func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsI // 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. @@ -6810,6 +9292,10 @@ func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *requ // 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. @@ -6868,6 +9354,114 @@ func (c *Lightsail) RebootInstanceWithContext(ctx aws.Context, input *RebootInst 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 @@ -7019,6 +9613,10 @@ func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *reques // 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. @@ -7077,6 +9675,115 @@ func (c *Lightsail) StartInstanceWithContext(ctx aws.Context, input *StartInstan 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 @@ -7123,6 +9830,10 @@ func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request. // // 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. @@ -7181,6 +9892,225 @@ func (c *Lightsail) StopInstanceWithContext(ctx aws.Context, input *StopInstance 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 @@ -7285,6 +10215,115 @@ func (c *Lightsail) UnpeerVpcWithContext(ctx aws.Context, input *UnpeerVpcInput, 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 @@ -7331,6 +10370,10 @@ func (c *Lightsail) UpdateDomainEntryRequest(input *UpdateDomainEntryInput) (req // // 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. @@ -7436,6 +10479,10 @@ func (c *Lightsail) UpdateLoadBalancerAttributeRequest(input *UpdateLoadBalancer // 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. @@ -7494,6 +10541,232 @@ func (c *Lightsail) UpdateLoadBalancerAttributeWithContext(ctx aws.Context, inpu 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"` @@ -7928,9 +11201,10 @@ type Blueprint struct { // 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. + // 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. @@ -8242,6 +11516,307 @@ func (s *CloseInstancePublicPortsOutput) SetOperation(v *Operation) *CloseInstan 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"` @@ -8270,6 +11845,11 @@ type CreateDiskFromSnapshotInput struct { // // 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 @@ -8328,6 +11908,12 @@ func (s *CreateDiskFromSnapshotInput) SetSizeInGb(v int64) *CreateDiskFromSnapsh 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"` @@ -8373,6 +11959,11 @@ type CreateDiskInput struct { // // 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 @@ -8422,6 +12013,12 @@ func (s *CreateDiskInput) SetSizeInGb(v int64) *CreateDiskInput { 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"` @@ -8458,6 +12055,11 @@ type CreateDiskSnapshotInput struct { // // 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 @@ -8498,6 +12100,12 @@ func (s *CreateDiskSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskSnaps 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"` @@ -8610,6 +12218,11 @@ type CreateDomainInput struct { // // 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 @@ -8641,6 +12254,12 @@ func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { 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"` @@ -8677,6 +12296,11 @@ type CreateInstanceSnapshotInput struct { // // 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 @@ -8717,6 +12341,12 @@ func (s *CreateInstanceSnapshotInput) SetInstanceSnapshotName(v string) *CreateI 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"` @@ -8748,9 +12378,9 @@ type CreateInstancesFromSnapshotInput struct { 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 + // 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 @@ -8777,13 +12407,18 @@ type CreateInstancesFromSnapshotInput struct { // 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 - // (http://lightsail.aws.amazon.com/ls/docs/getting-started/articles/pre-installed-apps). + // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). UserData *string `locationName:"userData" type:"string"` } @@ -8855,6 +12490,12 @@ func (s *CreateInstancesFromSnapshotInput) SetKeyPairName(v string) *CreateInsta 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 @@ -8889,9 +12530,9 @@ 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 + // 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 + // operation. Be sure to add the include Availability Zones parameter to your // request. // // AvailabilityZone is a required field @@ -8927,6 +12568,11 @@ type CreateInstancesInput struct { // 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. // @@ -9005,6 +12651,12 @@ func (s *CreateInstancesInput) SetKeyPairName(v string) *CreateInstancesInput { 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 @@ -9042,6 +12694,11 @@ type CreateKeyPairInput struct { // // 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 @@ -9073,6 +12730,12 @@ func (s *CreateKeyPairInput) SetKeyPairName(v string) *CreateKeyPairInput { 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"` @@ -9162,6 +12825,11 @@ type CreateLoadBalancerInput struct { // // 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 @@ -9226,6 +12894,12 @@ func (s *CreateLoadBalancerInput) SetLoadBalancerName(v string) *CreateLoadBalan 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"` @@ -9277,6 +12951,11 @@ type CreateLoadBalancerTlsCertificateInput struct { // // 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 @@ -9332,6 +13011,12 @@ func (s *CreateLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *C 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"` @@ -9355,6 +13040,527 @@ func (s *CreateLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) * 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"` @@ -9950,6 +14156,197 @@ func (s *DeleteLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) * return s } +type DeleteRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of the database snapshot created if skip final snapshot is false, + // which is the default value for that parameter. + // + // Specifying this parameter and also specifying the skip final snapshot parameter + // to true results in an error. + // + // Constraints: + // + // * 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 database that you are deleting. + // + // 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 DeleteRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFinalRelationalDatabaseSnapshotName sets the FinalRelationalDatabaseSnapshotName field's value. +func (s *DeleteRelationalDatabaseInput) SetFinalRelationalDatabaseSnapshotName(v string) *DeleteRelationalDatabaseInput { + s.FinalRelationalDatabaseSnapshotName = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *DeleteRelationalDatabaseInput) SetRelationalDatabaseName(v string) *DeleteRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +// 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 describing the result of your delete relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteRelationalDatabaseOutput) SetOperations(v []*Operation) *DeleteRelationalDatabaseOutput { + s.Operations = v + return s +} + +type DeleteRelationalDatabaseSnapshotInput struct { + _ struct{} `type:"structure"` + + // The name of the database snapshot that you are deleting. + // + // RelationalDatabaseSnapshotName is a required field + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRelationalDatabaseSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRelationalDatabaseSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRelationalDatabaseSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRelationalDatabaseSnapshotInput"} + if s.RelationalDatabaseSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *DeleteRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *DeleteRelationalDatabaseSnapshotInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +type DeleteRelationalDatabaseSnapshotOutput struct { + _ struct{} `type:"structure"` + + // 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 DeleteRelationalDatabaseSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRelationalDatabaseSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteRelationalDatabaseSnapshotOutput) SetOperations(v []*Operation) *DeleteRelationalDatabaseSnapshotOutput { + s.Operations = v + return s +} + +// Describes the destination of a record. +type DestinationInfo struct { + _ struct{} `type:"structure"` + + // The ID of the resource created at the destination. + Id *string `locationName:"id" type:"string"` + + // 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"` @@ -10212,6 +14609,10 @@ type Disk struct { // 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 @@ -10314,6 +14715,64 @@ func (s *Disk) SetSupportCode(v string) *Disk { return s } +// 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"` + + // 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 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 DiskInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiskInfo) GoString() string { + return s.String() +} + +// SetIsSystemDisk sets the IsSystemDisk field's value. +func (s *DiskInfo) SetIsSystemDisk(v bool) *DiskInfo { + s.IsSystemDisk = &v + return s +} + +// SetName sets the Name field's value. +func (s *DiskInfo) SetName(v string) *DiskInfo { + s.Name = &v + return s +} + +// SetPath sets the Path field's value. +func (s *DiskInfo) SetPath(v string) *DiskInfo { + s.Path = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *DiskInfo) SetSizeInGb(v int64) *DiskInfo { + s.SizeInGb = &v + return s +} + // Describes a block storage disk mapping. type DiskMap struct { _ struct{} `type:"structure"` @@ -10386,6 +14845,10 @@ type DiskSnapshot struct { // 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 @@ -10464,6 +14927,36 @@ func (s *DiskSnapshot) SetSupportCode(v string) *DiskSnapshot { 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"` + + // The size of the disk in GB (e.g., 32). + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` +} + +// String returns the string representation +func (s DiskSnapshotInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiskSnapshotInfo) GoString() string { + return s.String() +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *DiskSnapshotInfo) SetSizeInGb(v int64) *DiskSnapshotInfo { + s.SizeInGb = &v + return s +} + // Describes a domain where you are storing recordsets in Lightsail. type Domain struct { _ struct{} `type:"structure"` @@ -10490,6 +14983,10 @@ type Domain struct { // 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 @@ -10544,6 +15041,12 @@ func (s *Domain) SetSupportCode(v string) *Domain { return s } +// SetTags sets the Tags field's value. +func (s *Domain) SetTags(v []*Tag) *Domain { + s.Tags = v + return s +} + // Describes a domain recordset entry. type DomainEntry struct { _ struct{} `type:"structure"` @@ -10671,6 +15174,242 @@ func (s *DownloadDefaultKeyPairOutput) SetPublicKeyBase64(v string) *DownloadDef return s } +type ExportSnapshotInput struct { + _ struct{} `type:"structure"` + + // The name of the instance or disk snapshot to be exported to Amazon EC2. + // + // SourceSnapshotName is a required field + SourceSnapshotName *string `locationName:"sourceSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s ExportSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportSnapshotInput"} + if s.SourceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceSnapshotName sets the SourceSnapshotName field's value. +func (s *ExportSnapshotInput) SetSourceSnapshotName(v string) *ExportSnapshotInput { + s.SourceSnapshotName = &v + return s +} + +type ExportSnapshotOutput 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 ExportSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *ExportSnapshotOutput) SetOperations(v []*Operation) *ExportSnapshotOutput { + s.Operations = v + return s +} + +// Describes an export snapshot record. +type ExportSnapshotRecord struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the export snapshot record. + Arn *string `locationName:"arn" type:"string"` + + // 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 ExportSnapshotRecord) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportSnapshotRecord) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ExportSnapshotRecord) SetArn(v string) *ExportSnapshotRecord { + s.Arn = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *ExportSnapshotRecord) SetCreatedAt(v time.Time) *ExportSnapshotRecord { + s.CreatedAt = &v + return s +} + +// SetDestinationInfo sets the DestinationInfo field's value. +func (s *ExportSnapshotRecord) SetDestinationInfo(v *DestinationInfo) *ExportSnapshotRecord { + s.DestinationInfo = v + return s +} + +// SetLocation sets the Location field's value. +func (s *ExportSnapshotRecord) SetLocation(v *ResourceLocation) *ExportSnapshotRecord { + s.Location = v + return s +} + +// SetName sets the Name field's value. +func (s *ExportSnapshotRecord) SetName(v string) *ExportSnapshotRecord { + s.Name = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ExportSnapshotRecord) SetResourceType(v string) *ExportSnapshotRecord { + s.ResourceType = &v + return s +} + +// SetSourceInfo sets the SourceInfo field's value. +func (s *ExportSnapshotRecord) SetSourceInfo(v *ExportSnapshotRecordSourceInfo) *ExportSnapshotRecord { + s.SourceInfo = v + return s +} + +// SetState sets the State field's value. +func (s *ExportSnapshotRecord) SetState(v string) *ExportSnapshotRecord { + s.State = &v + return s +} + +// Describes the source of an export snapshot record. +type ExportSnapshotRecordSourceInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the source instance or disk snapshot. + Arn *string `locationName:"arn" type:"string"` + + // The date when the source instance or disk snapshot was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // A list of objects describing a disk snapshot. + DiskSnapshotInfo *DiskSnapshotInfo `locationName:"diskSnapshotInfo" type:"structure"` + + // The Amazon Resource Name (ARN) of the snapshot's source instance or disk. + FromResourceArn *string `locationName:"fromResourceArn" type:"string"` + + // The name of the snapshot's source instance or disk. + FromResourceName *string `locationName:"fromResourceName" type:"string"` + + // A list of objects describing an instance snapshot. + InstanceSnapshotInfo *InstanceSnapshotInfo `locationName:"instanceSnapshotInfo" type:"structure"` + + // 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 ExportSnapshotRecordSourceInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportSnapshotRecordSourceInfo) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ExportSnapshotRecordSourceInfo) SetArn(v string) *ExportSnapshotRecordSourceInfo { + s.Arn = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *ExportSnapshotRecordSourceInfo) SetCreatedAt(v time.Time) *ExportSnapshotRecordSourceInfo { + s.CreatedAt = &v + return s +} + +// SetDiskSnapshotInfo sets the DiskSnapshotInfo field's value. +func (s *ExportSnapshotRecordSourceInfo) SetDiskSnapshotInfo(v *DiskSnapshotInfo) *ExportSnapshotRecordSourceInfo { + s.DiskSnapshotInfo = v + return s +} + +// SetFromResourceArn sets the FromResourceArn field's value. +func (s *ExportSnapshotRecordSourceInfo) SetFromResourceArn(v string) *ExportSnapshotRecordSourceInfo { + s.FromResourceArn = &v + return s +} + +// SetFromResourceName sets the FromResourceName field's value. +func (s *ExportSnapshotRecordSourceInfo) SetFromResourceName(v string) *ExportSnapshotRecordSourceInfo { + s.FromResourceName = &v + return s +} + +// SetInstanceSnapshotInfo sets the InstanceSnapshotInfo field's value. +func (s *ExportSnapshotRecordSourceInfo) SetInstanceSnapshotInfo(v *InstanceSnapshotInfo) *ExportSnapshotRecordSourceInfo { + s.InstanceSnapshotInfo = v + return s +} + +// SetName sets the Name field's value. +func (s *ExportSnapshotRecordSourceInfo) SetName(v string) *ExportSnapshotRecordSourceInfo { + s.Name = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ExportSnapshotRecordSourceInfo) SetResourceType(v string) *ExportSnapshotRecordSourceInfo { + s.ResourceType = &v + return s +} + type GetActiveNamesInput struct { _ struct{} `type:"structure"` @@ -10862,6 +15601,63 @@ func (s *GetBundlesOutput) SetNextPageToken(v string) *GetBundlesOutput { return s } +type GetCloudFormationStackRecordsInput struct { + _ struct{} `type:"structure"` + + // 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 GetCloudFormationStackRecordsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCloudFormationStackRecordsInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetCloudFormationStackRecordsInput) SetPageToken(v string) *GetCloudFormationStackRecordsInput { + s.PageToken = &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() +} + +// SetCloudFormationStackRecords sets the CloudFormationStackRecords field's value. +func (s *GetCloudFormationStackRecordsOutput) SetCloudFormationStackRecords(v []*CloudFormationStackRecord) *GetCloudFormationStackRecordsOutput { + s.CloudFormationStackRecords = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetCloudFormationStackRecordsOutput) SetNextPageToken(v string) *GetCloudFormationStackRecordsOutput { + s.NextPageToken = &v + return s +} + type GetDiskInput struct { _ struct{} `type:"structure"` @@ -11218,6 +16014,63 @@ func (s *GetDomainsOutput) SetNextPageToken(v string) *GetDomainsOutput { return s } +type GetExportSnapshotRecordsInput struct { + _ struct{} `type:"structure"` + + // 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 GetExportSnapshotRecordsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportSnapshotRecordsInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetExportSnapshotRecordsInput) SetPageToken(v string) *GetExportSnapshotRecordsInput { + s.PageToken = &v + return s +} + +type GetExportSnapshotRecordsOutput struct { + _ struct{} `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 GetExportSnapshotRecordsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportSnapshotRecordsOutput) GoString() string { + return s.String() +} + +// SetExportSnapshotRecords sets the ExportSnapshotRecords field's value. +func (s *GetExportSnapshotRecordsOutput) SetExportSnapshotRecords(v []*ExportSnapshotRecord) *GetExportSnapshotRecordsOutput { + s.ExportSnapshotRecords = v + return s +} + +// 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"` @@ -11345,7 +16198,7 @@ type GetInstanceMetricDataInput struct { // MetricName is a required field MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"InstanceMetricName"` - // 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"` @@ -12061,7 +16914,7 @@ type GetLoadBalancerMetricDataInput struct { // MetricName is a required field MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"LoadBalancerMetricName"` - // The time period duration for your health data request. + // The granularity, in seconds, of the returned data points. // // Period is a required field Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` @@ -12555,7 +17408,7 @@ type GetOperationsForResourceOutput struct { // (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 nextPageToken parameter instead. + // 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"` @@ -12662,6 +17515,11 @@ type GetRegionsInput struct { // 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 @@ -12680,6 +17538,12 @@ func (s *GetRegionsInput) SetIncludeAvailabilityZones(v bool) *GetRegionsInput { return s } +// SetIncludeRelationalDatabaseAvailabilityZones sets the IncludeRelationalDatabaseAvailabilityZones field's value. +func (s *GetRegionsInput) SetIncludeRelationalDatabaseAvailabilityZones(v bool) *GetRegionsInput { + s.IncludeRelationalDatabaseAvailabilityZones = &v + return s +} + type GetRegionsOutput struct { _ struct{} `type:"structure"` @@ -12704,6 +17568,1018 @@ func (s *GetRegionsOutput) SetRegions(v []*Region) *GetRegionsOutput { return s } +type GetRelationalDatabaseBlueprintsInput struct { + _ struct{} `type:"structure"` + + // 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 GetRelationalDatabaseBlueprintsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseBlueprintsInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseBlueprintsInput) SetPageToken(v string) *GetRelationalDatabaseBlueprintsInput { + s.PageToken = &v + return s +} + +type GetRelationalDatabaseBlueprintsOutput struct { + _ struct{} `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 GetRelationalDatabaseBlueprintsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseBlueprintsOutput) GoString() string { + return s.String() +} + +// SetBlueprints sets the Blueprints field's value. +func (s *GetRelationalDatabaseBlueprintsOutput) SetBlueprints(v []*RelationalDatabaseBlueprint) *GetRelationalDatabaseBlueprintsOutput { + s.Blueprints = v + return s +} + +// 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 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 GetRelationalDatabaseBundlesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseBundlesInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseBundlesInput) SetPageToken(v string) *GetRelationalDatabaseBundlesInput { + s.PageToken = &v + return s +} + +type GetRelationalDatabaseBundlesOutput struct { + _ struct{} `type:"structure"` + + // 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 of your get relational + // database bundles request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s GetRelationalDatabaseBundlesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseBundlesOutput) GoString() string { + return s.String() +} + +// 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 *GetRelationalDatabaseBundlesOutput) SetNextPageToken(v string) *GetRelationalDatabaseBundlesOutput { + s.NextPageToken = &v + return s +} + +type GetRelationalDatabaseEventsInput struct { + _ struct{} `type:"structure"` + + // 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 GetRelationalDatabaseEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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 *GetRelationalDatabaseEventsInput) SetPageToken(v string) *GetRelationalDatabaseEventsInput { + s.PageToken = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseEventsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseEventsInput { + s.RelationalDatabaseName = &v + return s +} + +type GetRelationalDatabaseEventsOutput struct { + _ struct{} `type:"structure"` + + // 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 GetRelationalDatabaseEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseEventsOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseEventsOutput) SetNextPageToken(v string) *GetRelationalDatabaseEventsOutput { + s.NextPageToken = &v + return s +} + +// SetRelationalDatabaseEvents sets the RelationalDatabaseEvents field's value. +func (s *GetRelationalDatabaseEventsOutput) SetRelationalDatabaseEvents(v []*RelationalDatabaseEvent) *GetRelationalDatabaseEventsOutput { + s.RelationalDatabaseEvents = v + return s +} + +type GetRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of the database that you are looking up. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseInput"} + 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 *GetRelationalDatabaseInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +type GetRelationalDatabaseLogEventsInput struct { + _ struct{} `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 GetRelationalDatabaseLogEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseLogEventsInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetLogStreamName sets the LogStreamName field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetLogStreamName(v string) *GetRelationalDatabaseLogEventsInput { + s.LogStreamName = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetPageToken(v string) *GetRelationalDatabaseLogEventsInput { + s.PageToken = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseLogEventsInput { + s.RelationalDatabaseName = &v + return s +} + +// SetStartFromHead sets the StartFromHead field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetStartFromHead(v bool) *GetRelationalDatabaseLogEventsInput { + s.StartFromHead = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetStartTime(v time.Time) *GetRelationalDatabaseLogEventsInput { + s.StartTime = &v + return s +} + +type GetRelationalDatabaseLogEventsOutput struct { + _ struct{} `type:"structure"` + + // 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 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 GetRelationalDatabaseLogEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseLogEventsOutput) GoString() string { + return s.String() +} + +// SetNextBackwardToken sets the NextBackwardToken field's value. +func (s *GetRelationalDatabaseLogEventsOutput) SetNextBackwardToken(v string) *GetRelationalDatabaseLogEventsOutput { + s.NextBackwardToken = &v + return s +} + +// SetNextForwardToken sets the NextForwardToken field's value. +func (s *GetRelationalDatabaseLogEventsOutput) SetNextForwardToken(v string) *GetRelationalDatabaseLogEventsOutput { + s.NextForwardToken = &v + return s +} + +// 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 your database for which to get log streams. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRelationalDatabaseLogStreamsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseLogStreamsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseLogStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseLogStreamsInput"} + 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 *GetRelationalDatabaseLogStreamsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseLogStreamsInput { + s.RelationalDatabaseName = &v + return s +} + +type GetRelationalDatabaseLogStreamsOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your get relational database log streams + // request. + LogStreams []*string `locationName:"logStreams" type:"list"` +} + +// String returns the string representation +func (s GetRelationalDatabaseLogStreamsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseLogStreamsOutput) GoString() string { + return s.String() +} + +// SetLogStreams sets the LogStreams field's value. +func (s *GetRelationalDatabaseLogStreamsOutput) SetLogStreams(v []*string) *GetRelationalDatabaseLogStreamsOutput { + s.LogStreams = v + return s +} + +type GetRelationalDatabaseMasterUserPasswordInput struct { + _ struct{} `type:"structure"` + + // The password version to return. + // + // 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 GetRelationalDatabaseMasterUserPasswordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseMasterUserPasswordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseMasterUserPasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseMasterUserPasswordInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPasswordVersion sets the PasswordVersion field's value. +func (s *GetRelationalDatabaseMasterUserPasswordInput) SetPasswordVersion(v string) *GetRelationalDatabaseMasterUserPasswordInput { + s.PasswordVersion = &v + return s +} + +// 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 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 metric data to return. + // + // MetricName is a required field + MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"RelationalDatabaseMetricName"` + + // 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 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 array of statistics for your metric data request. + // + // Statistics is a required field + Statistics []*string `locationName:"statistics" type:"list" required:"true"` + + // 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 GetRelationalDatabaseMetricDataInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseMetricDataInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseMetricDataInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + 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.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + 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 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *GetRelationalDatabaseMetricDataInput) SetEndTime(v time.Time) *GetRelationalDatabaseMetricDataInput { + s.EndTime = &v + return s +} + +// SetMetricName sets the MetricName field's value. +func (s *GetRelationalDatabaseMetricDataInput) SetMetricName(v string) *GetRelationalDatabaseMetricDataInput { + s.MetricName = &v + return s +} + +// SetPeriod sets the Period field's value. +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 *GetRelationalDatabaseMetricDataInput) SetStartTime(v time.Time) *GetRelationalDatabaseMetricDataInput { + s.StartTime = &v + return s +} + +// SetStatistics sets the Statistics field's value. +func (s *GetRelationalDatabaseMetricDataInput) SetStatistics(v []*string) *GetRelationalDatabaseMetricDataInput { + s.Statistics = v + return s +} + +// SetUnit sets the Unit field's value. +func (s *GetRelationalDatabaseMetricDataInput) SetUnit(v string) *GetRelationalDatabaseMetricDataInput { + s.Unit = &v + return s +} + +type GetRelationalDatabaseMetricDataOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your get relational database metric data + // request. + MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` + + // The name of the metric. + MetricName *string `locationName:"metricName" type:"string" enum:"RelationalDatabaseMetricName"` +} + +// String returns the string representation +func (s GetRelationalDatabaseMetricDataOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseMetricDataOutput) GoString() string { + return s.String() +} + +// SetMetricData sets the MetricData field's value. +func (s *GetRelationalDatabaseMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetRelationalDatabaseMetricDataOutput { + s.MetricData = v + return s +} + +// SetMetricName sets the MetricName field's value. +func (s *GetRelationalDatabaseMetricDataOutput) SetMetricName(v string) *GetRelationalDatabaseMetricDataOutput { + s.MetricName = &v + return s +} + +type GetRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the specified database. + RelationalDatabase *RelationalDatabase `locationName:"relationalDatabase" type:"structure"` +} + +// String returns the string representation +func (s GetRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetRelationalDatabase sets the RelationalDatabase field's value. +func (s *GetRelationalDatabaseOutput) SetRelationalDatabase(v *RelationalDatabase) *GetRelationalDatabaseOutput { + s.RelationalDatabase = v + return s +} + +type GetRelationalDatabaseParametersInput struct { + _ struct{} `type:"structure"` + + // 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. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRelationalDatabaseParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseParametersInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseParametersInput) SetPageToken(v string) *GetRelationalDatabaseParametersInput { + s.PageToken = &v + return s +} + +// 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"` + + // 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 GetRelationalDatabaseParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseParametersOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseParametersOutput) SetNextPageToken(v string) *GetRelationalDatabaseParametersOutput { + s.NextPageToken = &v + return s +} + +// 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 database snapshot for which to get information. + // + // RelationalDatabaseSnapshotName is a required field + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRelationalDatabaseSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseSnapshotInput"} + if s.RelationalDatabaseSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *GetRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *GetRelationalDatabaseSnapshotInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +type GetRelationalDatabaseSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the specified database snapshot. + RelationalDatabaseSnapshot *RelationalDatabaseSnapshot `locationName:"relationalDatabaseSnapshot" type:"structure"` +} + +// String returns the string representation +func (s GetRelationalDatabaseSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseSnapshotOutput) GoString() string { + return s.String() +} + +// SetRelationalDatabaseSnapshot sets the RelationalDatabaseSnapshot field's value. +func (s *GetRelationalDatabaseSnapshotOutput) SetRelationalDatabaseSnapshot(v *RelationalDatabaseSnapshot) *GetRelationalDatabaseSnapshotOutput { + s.RelationalDatabaseSnapshot = v + return s +} + +type GetRelationalDatabaseSnapshotsInput struct { + _ struct{} `type:"structure"` + + // 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 GetRelationalDatabaseSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseSnapshotsInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseSnapshotsInput) SetPageToken(v string) *GetRelationalDatabaseSnapshotsInput { + s.PageToken = &v + return s +} + +type GetRelationalDatabaseSnapshotsOutput struct { + _ struct{} `type:"structure"` + + // 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 GetRelationalDatabaseSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseSnapshotsOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseSnapshotsOutput) SetNextPageToken(v string) *GetRelationalDatabaseSnapshotsOutput { + s.NextPageToken = &v + return s +} + +// SetRelationalDatabaseSnapshots sets the RelationalDatabaseSnapshots field's value. +func (s *GetRelationalDatabaseSnapshotsOutput) SetRelationalDatabaseSnapshots(v []*RelationalDatabaseSnapshot) *GetRelationalDatabaseSnapshotsOutput { + s.RelationalDatabaseSnapshots = v + return s +} + +type GetRelationalDatabasesInput struct { + _ struct{} `type:"structure"` + + // 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 GetRelationalDatabasesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabasesInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabasesInput) SetPageToken(v string) *GetRelationalDatabasesInput { + s.PageToken = &v + return s +} + +type GetRelationalDatabasesOutput struct { + _ struct{} `type:"structure"` + + // 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 GetRelationalDatabasesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabasesOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabasesOutput) SetNextPageToken(v string) *GetRelationalDatabasesOutput { + s.NextPageToken = &v + return s +} + +// SetRelationalDatabases sets the RelationalDatabases field's value. +func (s *GetRelationalDatabasesOutput) SetRelationalDatabases(v []*RelationalDatabase) *GetRelationalDatabasesOutput { + s.RelationalDatabases = v + return s +} + type GetStaticIpInput struct { _ struct{} `type:"structure"` @@ -12928,7 +18804,7 @@ type Instance struct { // to it. IsStaticIp *bool `locationName:"isStaticIp" type:"boolean"` - // The region name and availability zone where the instance is located. + // 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). @@ -12958,6 +18834,10 @@ type Instance struct { // 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"` } @@ -13074,6 +18954,12 @@ func (s *Instance) SetSupportCode(v string) *Instance { 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 @@ -13193,6 +19079,114 @@ func (s *InstanceAccessDetails) SetUsername(v string) *InstanceAccessDetails { 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 Availability Zone for the new Amazon EC2 instance. + // + // 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 InstanceEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceEntry) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *InstanceEntry) SetAvailabilityZone(v string) *InstanceEntry { + s.AvailabilityZone = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *InstanceEntry) SetInstanceType(v string) *InstanceEntry { + s.InstanceType = &v + return s +} + +// SetPortInfoSource sets the PortInfoSource field's value. +func (s *InstanceEntry) SetPortInfoSource(v string) *InstanceEntry { + s.PortInfoSource = &v + return s +} + +// SetSourceName sets the SourceName field's value. +func (s *InstanceEntry) SetSourceName(v string) *InstanceEntry { + s.SourceName = &v + return s +} + +// SetUserData sets the UserData field's value. +func (s *InstanceEntry) SetUserData(v string) *InstanceEntry { + s.UserData = &v + return s +} + // Describes the hardware for the instance. type InstanceHardware struct { _ struct{} `type:"structure"` @@ -13549,7 +19543,7 @@ type InstanceSnapshot struct { // 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. + // The region name and Availability Zone where you created the snapshot. Location *ResourceLocation `locationName:"location" type:"structure"` // The name of the snapshot. @@ -13571,6 +19565,10 @@ type InstanceSnapshot struct { // 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 @@ -13667,6 +19665,54 @@ func (s *InstanceSnapshot) SetSupportCode(v string) *InstanceSnapshot { return s } +// SetTags sets the Tags field's value. +func (s *InstanceSnapshot) SetTags(v []*Tag) *InstanceSnapshot { + s.Tags = v + return s +} + +// Describes an instance snapshot. +type InstanceSnapshotInfo struct { + _ struct{} `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 InstanceSnapshotInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceSnapshotInfo) GoString() string { + return s.String() +} + +// SetFromBlueprintId sets the FromBlueprintId field's value. +func (s *InstanceSnapshotInfo) SetFromBlueprintId(v string) *InstanceSnapshotInfo { + s.FromBlueprintId = &v + return s +} + +// SetFromBundleId sets the FromBundleId field's value. +func (s *InstanceSnapshotInfo) SetFromBundleId(v string) *InstanceSnapshotInfo { + s.FromBundleId = &v + return s +} + +// SetFromDiskInfo sets the FromDiskInfo field's value. +func (s *InstanceSnapshotInfo) SetFromDiskInfo(v []*DiskInfo) *InstanceSnapshotInfo { + s.FromDiskInfo = v + return s +} + // Describes the virtual private server (or instance) status. type InstanceState struct { _ struct{} `type:"structure"` @@ -13763,6 +19809,10 @@ type KeyPair struct { // 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 @@ -13817,6 +19867,12 @@ func (s *KeyPair) SetSupportCode(v string) *KeyPair { return s } +// SetTags sets the Tags field's value. +func (s *KeyPair) SetTags(v []*Tag) *KeyPair { + s.Tags = v + return s +} + // Describes the Lightsail load balancer. type LoadBalancer struct { _ struct{} `type:"structure"` @@ -13873,6 +19929,10 @@ type LoadBalancer struct { // 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. @@ -13973,6 +20033,12 @@ func (s *LoadBalancer) SetSupportCode(v string) *LoadBalancer { return s } +// SetTags sets the Tags field's value. +func (s *LoadBalancer) SetTags(v []*Tag) *LoadBalancer { + s.Tags = v + return s +} + // SetTlsCertificateSummaries sets the TlsCertificateSummaries field's value. func (s *LoadBalancer) SetTlsCertificateSummaries(v []*LoadBalancerTlsCertificateSummary) *LoadBalancer { s.TlsCertificateSummaries = v @@ -14088,6 +20154,10 @@ type LoadBalancerTlsCertificate struct { // 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 @@ -14244,6 +20314,12 @@ func (s *LoadBalancerTlsCertificate) SetSupportCode(v string) *LoadBalancerTlsCe return s } +// SetTags sets the Tags field's value. +func (s *LoadBalancerTlsCertificate) SetTags(v []*Tag) *LoadBalancerTlsCertificate { + s.Tags = 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 { @@ -14408,6 +20484,39 @@ func (s *LoadBalancerTlsCertificateSummary) SetName(v string) *LoadBalancerTlsCe return s } +// 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 LogEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogEvent) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *LogEvent) SetCreatedAt(v time.Time) *LogEvent { + s.CreatedAt = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *LogEvent) SetMessage(v string) *LogEvent { + s.Message = &v + return s +} + // Describes the metric data point. type MetricDatapoint struct { _ struct{} `type:"structure"` @@ -14798,6 +20907,90 @@ func (s *PeerVpcOutput) SetOperation(v *Operation) *PeerVpcOutput { 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"` +} + +// String returns the string representation +func (s PendingMaintenanceAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingMaintenanceAction) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { + s.Action = &v + return s +} + +// SetCurrentApplyDate sets the CurrentApplyDate field's value. +func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { + s.CurrentApplyDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { + s.Description = &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"` +} + +// String returns the string representation +func (s PendingModifiedRelationalDatabaseValues) String() string { + return awsutil.Prettify(s) +} + +// 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 +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *PendingModifiedRelationalDatabaseValues) SetEngineVersion(v string) *PendingModifiedRelationalDatabaseValues { + s.EngineVersion = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *PendingModifiedRelationalDatabaseValues) SetMasterUserPassword(v string) *PendingModifiedRelationalDatabaseValues { + s.MasterUserPassword = &v + return s +} + // Describes information about the ports on your virtual private server (or // instance). type PortInfo struct { @@ -14977,6 +21170,67 @@ func (s *RebootInstanceOutput) SetOperations(v []*Operation) *RebootInstanceOutp 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"` +} + +// String returns the string representation +func (s RebootRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootRelationalDatabaseInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *RebootRelationalDatabaseInput) SetRelationalDatabaseName(v string) *RebootRelationalDatabaseInput { + s.RelationalDatabaseName = &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"` +} + +// String returns the string representation +func (s RebootRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *RebootRelationalDatabaseOutput) SetOperations(v []*Operation) *RebootRelationalDatabaseOutput { + s.Operations = v + return s +} + // Describes the AWS Region. type Region struct { _ struct{} `type:"structure"` @@ -14996,6 +21250,9 @@ type Region struct { // 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"` } // String returns the string representation @@ -15038,6 +21295,805 @@ func (s *Region) SetName(v string) *Region { return s } +// SetRelationalDatabaseAvailabilityZones sets the RelationalDatabaseAvailabilityZones field's value. +func (s *Region) SetRelationalDatabaseAvailabilityZones(v []*AvailabilityZone) *Region { + s.RelationalDatabaseAvailabilityZones = v + return s +} + +// Describes a database. +type RelationalDatabase struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the database. + Arn *string `locationName:"arn" type:"string"` + + // A Boolean value indicating whether automated backup retention is enabled + // for the database. + BackupRetentionEnabled *bool `locationName:"backupRetentionEnabled" type:"boolean"` + + // The timestamp when the database was created. Formatted in Unix time. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The database software (for example, MySQL). + Engine *string `locationName:"engine" type:"string"` + + // The database engine version (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // Describes the hardware of the database. + Hardware *RelationalDatabaseHardware `locationName:"hardware" 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 Lightsail resource type for the database (for example, RelationalDatabase). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // 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"` + + // Describes the current state of the database. + State *string `locationName:"state" type:"string"` + + // 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 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 RelationalDatabase) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabase) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *RelationalDatabase) SetArn(v string) *RelationalDatabase { + s.Arn = &v + return s +} + +// SetBackupRetentionEnabled sets the BackupRetentionEnabled field's value. +func (s *RelationalDatabase) SetBackupRetentionEnabled(v bool) *RelationalDatabase { + s.BackupRetentionEnabled = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *RelationalDatabase) SetCreatedAt(v time.Time) *RelationalDatabase { + s.CreatedAt = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *RelationalDatabase) SetEngine(v string) *RelationalDatabase { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabase) SetEngineVersion(v string) *RelationalDatabase { + s.EngineVersion = &v + return s +} + +// SetHardware sets the Hardware field's value. +func (s *RelationalDatabase) SetHardware(v *RelationalDatabaseHardware) *RelationalDatabase { + s.Hardware = v + return s +} + +// SetLatestRestorableTime sets the LatestRestorableTime field's value. +func (s *RelationalDatabase) SetLatestRestorableTime(v time.Time) *RelationalDatabase { + s.LatestRestorableTime = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *RelationalDatabase) SetLocation(v *ResourceLocation) *RelationalDatabase { + s.Location = v + return s +} + +// SetMasterDatabaseName sets the MasterDatabaseName field's value. +func (s *RelationalDatabase) SetMasterDatabaseName(v string) *RelationalDatabase { + s.MasterDatabaseName = &v + return s +} + +// SetMasterEndpoint sets the MasterEndpoint field's value. +func (s *RelationalDatabase) SetMasterEndpoint(v *RelationalDatabaseEndpoint) *RelationalDatabase { + s.MasterEndpoint = v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *RelationalDatabase) SetMasterUsername(v string) *RelationalDatabase { + s.MasterUsername = &v + return s +} + +// SetName sets the Name field's value. +func (s *RelationalDatabase) SetName(v string) *RelationalDatabase { + s.Name = &v + return s +} + +// SetParameterApplyStatus sets the ParameterApplyStatus field's value. +func (s *RelationalDatabase) SetParameterApplyStatus(v string) *RelationalDatabase { + s.ParameterApplyStatus = &v + return s +} + +// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. +func (s *RelationalDatabase) SetPendingMaintenanceActions(v []*PendingMaintenanceAction) *RelationalDatabase { + s.PendingMaintenanceActions = v + return s +} + +// SetPendingModifiedValues sets the PendingModifiedValues field's value. +func (s *RelationalDatabase) SetPendingModifiedValues(v *PendingModifiedRelationalDatabaseValues) *RelationalDatabase { + s.PendingModifiedValues = v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *RelationalDatabase) SetPreferredBackupWindow(v string) *RelationalDatabase { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *RelationalDatabase) SetPreferredMaintenanceWindow(v string) *RelationalDatabase { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *RelationalDatabase) SetPubliclyAccessible(v bool) *RelationalDatabase { + s.PubliclyAccessible = &v + return s +} + +// SetRelationalDatabaseBlueprintId sets the RelationalDatabaseBlueprintId field's value. +func (s *RelationalDatabase) SetRelationalDatabaseBlueprintId(v string) *RelationalDatabase { + s.RelationalDatabaseBlueprintId = &v + return s +} + +// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. +func (s *RelationalDatabase) SetRelationalDatabaseBundleId(v string) *RelationalDatabase { + s.RelationalDatabaseBundleId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *RelationalDatabase) SetResourceType(v string) *RelationalDatabase { + s.ResourceType = &v + return s +} + +// SetSecondaryAvailabilityZone sets the SecondaryAvailabilityZone field's value. +func (s *RelationalDatabase) SetSecondaryAvailabilityZone(v string) *RelationalDatabase { + s.SecondaryAvailabilityZone = &v + return s +} + +// SetState sets the State field's value. +func (s *RelationalDatabase) SetState(v string) *RelationalDatabase { + s.State = &v + return s +} + +// SetSupportCode sets the SupportCode field's value. +func (s *RelationalDatabase) SetSupportCode(v string) *RelationalDatabase { + s.SupportCode = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *RelationalDatabase) SetTags(v []*Tag) *RelationalDatabase { + s.Tags = v + return s +} + +// Describes a database image, or blueprint. A blueprint describes the major +// engine version of a database. +type RelationalDatabaseBlueprint struct { + _ struct{} `type:"structure"` + + // The ID for the database blueprint. + BlueprintId *string `locationName:"blueprintId" type:"string"` + + // The database software of the database blueprint (for example, MySQL). + Engine *string `locationName:"engine" type:"string" enum:"RelationalDatabaseEngine"` + + // The description of the database engine for the database blueprint. + EngineDescription *string `locationName:"engineDescription" type:"string"` + + // The database engine version for the database blueprint (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // The description of the database engine version for the database blueprint. + EngineVersionDescription *string `locationName:"engineVersionDescription" type:"string"` + + // 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 RelationalDatabaseBlueprint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabaseBlueprint) GoString() string { + return s.String() +} + +// SetBlueprintId sets the BlueprintId field's value. +func (s *RelationalDatabaseBlueprint) SetBlueprintId(v string) *RelationalDatabaseBlueprint { + s.BlueprintId = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *RelationalDatabaseBlueprint) SetEngine(v string) *RelationalDatabaseBlueprint { + s.Engine = &v + return s +} + +// SetEngineDescription sets the EngineDescription field's value. +func (s *RelationalDatabaseBlueprint) SetEngineDescription(v string) *RelationalDatabaseBlueprint { + s.EngineDescription = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabaseBlueprint) SetEngineVersion(v string) *RelationalDatabaseBlueprint { + s.EngineVersion = &v + return s +} + +// SetEngineVersionDescription sets the EngineVersionDescription field's value. +func (s *RelationalDatabaseBlueprint) SetEngineVersionDescription(v string) *RelationalDatabaseBlueprint { + s.EngineVersionDescription = &v + return s +} + +// SetIsEngineDefault sets the IsEngineDefault field's value. +func (s *RelationalDatabaseBlueprint) SetIsEngineDefault(v bool) *RelationalDatabaseBlueprint { + s.IsEngineDefault = &v + return s +} + +// Describes a database bundle. A bundle describes the performance specifications +// of the database. +type RelationalDatabaseBundle struct { + _ struct{} `type:"structure"` + + // The ID for the database bundle. + BundleId *string `locationName:"bundleId" type:"string"` + + // The number of virtual CPUs (vCPUs) for the database bundle. + CpuCount *int64 `locationName:"cpuCount" type:"integer"` + + // The size of the disk for the database bundle. + DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` + + // A Boolean value indicating whether the database bundle is active. + IsActive *bool `locationName:"isActive" type:"boolean"` + + // A Boolean value indicating whether the database bundle is encrypted. + IsEncrypted *bool `locationName:"isEncrypted" type:"boolean"` + + // The name for the database bundle. + Name *string `locationName:"name" type:"string"` + + // The cost of the database bundle in US currency. + Price *float64 `locationName:"price" type:"float"` + + // The amount of RAM in GB (for example, 2.0) for the database bundle. + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` + + // 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 RelationalDatabaseBundle) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabaseBundle) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *RelationalDatabaseBundle) SetBundleId(v string) *RelationalDatabaseBundle { + s.BundleId = &v + return s +} + +// SetCpuCount sets the CpuCount field's value. +func (s *RelationalDatabaseBundle) SetCpuCount(v int64) *RelationalDatabaseBundle { + s.CpuCount = &v + return s +} + +// SetDiskSizeInGb sets the DiskSizeInGb field's value. +func (s *RelationalDatabaseBundle) SetDiskSizeInGb(v int64) *RelationalDatabaseBundle { + s.DiskSizeInGb = &v + return s +} + +// SetIsActive sets the IsActive field's value. +func (s *RelationalDatabaseBundle) SetIsActive(v bool) *RelationalDatabaseBundle { + s.IsActive = &v + return s +} + +// SetIsEncrypted sets the IsEncrypted field's value. +func (s *RelationalDatabaseBundle) SetIsEncrypted(v bool) *RelationalDatabaseBundle { + s.IsEncrypted = &v + return s +} + +// SetName sets the Name field's value. +func (s *RelationalDatabaseBundle) SetName(v string) *RelationalDatabaseBundle { + s.Name = &v + return s +} + +// SetPrice sets the Price field's value. +func (s *RelationalDatabaseBundle) SetPrice(v float64) *RelationalDatabaseBundle { + s.Price = &v + return s +} + +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *RelationalDatabaseBundle) SetRamSizeInGb(v float64) *RelationalDatabaseBundle { + s.RamSizeInGb = &v + return s +} + +// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. +func (s *RelationalDatabaseBundle) SetTransferPerMonthInGb(v int64) *RelationalDatabaseBundle { + s.TransferPerMonthInGb = &v + return s +} + +// Describes an endpoint for a database. +type RelationalDatabaseEndpoint struct { + _ struct{} `type:"structure"` + + // Specifies the DNS address of the database. + Address *string `locationName:"address" type:"string"` + + // Specifies the port that the database is listening on. + Port *int64 `locationName:"port" type:"integer"` +} + +// String returns the string representation +func (s RelationalDatabaseEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabaseEndpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *RelationalDatabaseEndpoint) SetAddress(v string) *RelationalDatabaseEndpoint { + s.Address = &v + return s +} + +// SetPort sets the Port field's value. +func (s *RelationalDatabaseEndpoint) SetPort(v int64) *RelationalDatabaseEndpoint { + s.Port = &v + return s +} + +// 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 RelationalDatabaseEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabaseEvent) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *RelationalDatabaseEvent) SetCreatedAt(v time.Time) *RelationalDatabaseEvent { + s.CreatedAt = &v + return s +} + +// SetEventCategories sets the EventCategories field's value. +func (s *RelationalDatabaseEvent) SetEventCategories(v []*string) *RelationalDatabaseEvent { + s.EventCategories = v + return s +} + +// SetMessage sets the Message field's value. +func (s *RelationalDatabaseEvent) SetMessage(v string) *RelationalDatabaseEvent { + s.Message = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *RelationalDatabaseEvent) SetResource(v string) *RelationalDatabaseEvent { + s.Resource = &v + return s +} + +// Describes the hardware of a database. +type RelationalDatabaseHardware struct { + _ struct{} `type:"structure"` + + // The number of vCPUs for the database. + CpuCount *int64 `locationName:"cpuCount" type:"integer"` + + // The size of the disk for the database. + DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` + + // The amount of RAM in GB for the database. + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` +} + +// String returns the string representation +func (s RelationalDatabaseHardware) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabaseHardware) GoString() string { + return s.String() +} + +// SetCpuCount sets the CpuCount field's value. +func (s *RelationalDatabaseHardware) SetCpuCount(v int64) *RelationalDatabaseHardware { + s.CpuCount = &v + return s +} + +// SetDiskSizeInGb sets the DiskSizeInGb field's value. +func (s *RelationalDatabaseHardware) SetDiskSizeInGb(v int64) *RelationalDatabaseHardware { + s.DiskSizeInGb = &v + return s +} + +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *RelationalDatabaseHardware) SetRamSizeInGb(v float64) *RelationalDatabaseHardware { + s.RamSizeInGb = &v + return s +} + +// Describes the parameters of a database. +type RelationalDatabaseParameter struct { + _ struct{} `type:"structure"` + + // Specifies the valid range of values for the parameter. + AllowedValues *string `locationName:"allowedValues" type:"string"` + + // Indicates when parameter updates are applied. + // + // 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 RelationalDatabaseParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabaseParameter) GoString() string { + return s.String() +} + +// SetAllowedValues sets the AllowedValues field's value. +func (s *RelationalDatabaseParameter) SetAllowedValues(v string) *RelationalDatabaseParameter { + s.AllowedValues = &v + return s +} + +// SetApplyMethod sets the ApplyMethod field's value. +func (s *RelationalDatabaseParameter) SetApplyMethod(v string) *RelationalDatabaseParameter { + s.ApplyMethod = &v + return s +} + +// SetApplyType sets the ApplyType field's value. +func (s *RelationalDatabaseParameter) SetApplyType(v string) *RelationalDatabaseParameter { + s.ApplyType = &v + return s +} + +// SetDataType sets the DataType field's value. +func (s *RelationalDatabaseParameter) SetDataType(v string) *RelationalDatabaseParameter { + s.DataType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RelationalDatabaseParameter) SetDescription(v string) *RelationalDatabaseParameter { + s.Description = &v + return s +} + +// SetIsModifiable sets the IsModifiable field's value. +func (s *RelationalDatabaseParameter) SetIsModifiable(v bool) *RelationalDatabaseParameter { + s.IsModifiable = &v + return s +} + +// SetParameterName sets the ParameterName field's value. +func (s *RelationalDatabaseParameter) SetParameterName(v string) *RelationalDatabaseParameter { + s.ParameterName = &v + return s +} + +// SetParameterValue sets the ParameterValue field's value. +func (s *RelationalDatabaseParameter) SetParameterValue(v string) *RelationalDatabaseParameter { + s.ParameterValue = &v + return s +} + +// Describes a database snapshot. +type RelationalDatabaseSnapshot struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the database snapshot. + Arn *string `locationName:"arn" type:"string"` + + // The timestamp when the database snapshot was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The software of the database snapshot (for example, MySQL) + Engine *string `locationName:"engine" type:"string"` + + // The database engine version for the database snapshot (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // 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"` + + // The state of the database snapshot. + State *string `locationName:"state" type:"string"` + + // 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"` + + // 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 RelationalDatabaseSnapshot) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabaseSnapshot) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *RelationalDatabaseSnapshot) SetArn(v string) *RelationalDatabaseSnapshot { + s.Arn = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *RelationalDatabaseSnapshot) SetCreatedAt(v time.Time) *RelationalDatabaseSnapshot { + s.CreatedAt = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *RelationalDatabaseSnapshot) SetEngine(v string) *RelationalDatabaseSnapshot { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabaseSnapshot) SetEngineVersion(v string) *RelationalDatabaseSnapshot { + s.EngineVersion = &v + return s +} + +// SetFromRelationalDatabaseArn sets the FromRelationalDatabaseArn field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseArn(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseArn = &v + return s +} + +// SetFromRelationalDatabaseBlueprintId sets the FromRelationalDatabaseBlueprintId field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBlueprintId(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseBlueprintId = &v + return s +} + +// SetFromRelationalDatabaseBundleId sets the FromRelationalDatabaseBundleId field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBundleId(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseBundleId = &v + return s +} + +// SetFromRelationalDatabaseName sets the FromRelationalDatabaseName field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseName(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseName = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *RelationalDatabaseSnapshot) SetLocation(v *ResourceLocation) *RelationalDatabaseSnapshot { + s.Location = v + return s +} + +// SetName sets the Name field's value. +func (s *RelationalDatabaseSnapshot) SetName(v string) *RelationalDatabaseSnapshot { + s.Name = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *RelationalDatabaseSnapshot) SetResourceType(v string) *RelationalDatabaseSnapshot { + s.ResourceType = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *RelationalDatabaseSnapshot) SetSizeInGb(v int64) *RelationalDatabaseSnapshot { + s.SizeInGb = &v + return s +} + +// SetState sets the State field's value. +func (s *RelationalDatabaseSnapshot) SetState(v string) *RelationalDatabaseSnapshot { + s.State = &v + return s +} + +// 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 +} + type ReleaseStaticIpInput struct { _ struct{} `type:"structure"` @@ -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"` @@ -15366,6 +22483,194 @@ func (s *StopInstanceOutput) SetOperations(v []*Operation) *StopInstanceOutput { 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 *TagResourceOutput) SetOperations(v []*Operation) *TagResourceOutput { + s.Operations = v + return s +} + type UnpeerVpcInput struct { _ struct{} `type:"structure"` } @@ -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 f17f888c0..d09b97380 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 @@ -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 } @@ -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 } 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 4ee35c42e..fdce6d30b 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" @@ -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. @@ -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. @@ -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. @@ -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,6 +374,96 @@ 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 @@ -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. @@ -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. @@ -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,6 +736,95 @@ 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 @@ -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. @@ -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 11ebf2e51..f64caedd3 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 b92e1e8df..7f030ac73 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" @@ -190,6 +192,95 @@ 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 @@ -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 } @@ -369,6 +461,95 @@ 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 @@ -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 } @@ -1067,6 +1249,94 @@ 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 @@ -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 } @@ -1464,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 } @@ -1656,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. @@ -1669,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 @@ -1729,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"` @@ -1881,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"` } @@ -1972,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 @@ -2017,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 @@ -2047,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"` @@ -2102,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"` } @@ -2148,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 @@ -2211,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 @@ -2246,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"` @@ -2272,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 @@ -2331,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 @@ -2391,6 +2833,8 @@ type DescribeBrokerResponse struct { SubnetIds []*string `locationName:"subnetIds" type:"list"` + Tags map[string]*string `locationName:"tags" type:"map"` + Users []*UserSummary `locationName:"users" type:"list"` } @@ -2512,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 @@ -2541,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 @@ -2574,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 @@ -2634,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"` @@ -2660,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 @@ -2754,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 @@ -2932,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)) } @@ -3087,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"` @@ -3114,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)) } @@ -3342,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 @@ -3445,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 @@ -3565,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 @@ -3699,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 f6209f427..93179fe42 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } 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 8ca5b1407..e2ea62709 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 974cf99b3..0c0555d69 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 @@ -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 } @@ -2068,8 +2067,7 @@ 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 } @@ -2233,8 +2231,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 } @@ -2403,8 +2400,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 } @@ -3484,8 +3480,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 } @@ -3760,8 +3755,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 } @@ -4307,8 +4301,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 } @@ -5319,8 +5312,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 } @@ -8585,8 +8577,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 } @@ -8763,8 +8754,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 } @@ -9525,7 +9515,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. // @@ -9544,7 +9534,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"` @@ -9801,7 +9791,7 @@ 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 @@ -9810,7 +9800,7 @@ type CreateAccountInput struct { // 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, only the @@ -9947,7 +9937,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"` @@ -11506,7 +11496,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. // @@ -11584,7 +11574,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 @@ -11620,7 +11610,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: @@ -13311,7 +13301,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. // 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 index 1b9e3df5a..76152a5e3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go @@ -1888,6 +1888,100 @@ func (c *Pinpoint) DeleteUserEndpointsWithContext(ctx aws.Context, input *Delete 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 @@ -4802,6 +4896,100 @@ func (c *Pinpoint) GetUserEndpointsWithContext(ctx aws.Context, input *GetUserEn 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 @@ -6683,6 +6871,100 @@ func (c *Pinpoint) UpdateSmsChannelWithContext(ctx aws.Context, input *UpdateSms 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"` @@ -7256,7 +7538,8 @@ type APNSMessage struct { // data.pinpoint.jsonBody' object Data map[string]*string `type:"map"` - // The URL that points to a video used in the push notification. + // 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" @@ -8347,9 +8630,20 @@ type ApplicationSettingsResource struct { // own. Limits *CampaignLimits `type:"structure"` - // The default quiet time for the app. Each campaign for this app sends no messages - // during this time unless the campaign overrides the default with a quiet time - // of its own. + // 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"` } @@ -8872,6 +9166,42 @@ func (s *CampaignEmailMessage) SetTitle(v string) *CampaignEmailMessage { 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"` @@ -8916,11 +9246,12 @@ func (s *CampaignHook) SetWebUrl(v string) *CampaignHook { } // Campaign Limits are used to limit the number of messages that can be sent -// to a user. +// to a single endpoint. type CampaignLimits struct { _ struct{} `type:"structure"` - // The maximum number of messages that the campaign can send daily. + // 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 @@ -8932,7 +9263,8 @@ type CampaignLimits struct { // value is 50, and the maximum is 20000. MessagesPerSecond *int64 `type:"integer"` - // The maximum total number of messages that the campaign can send. + // 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"` } @@ -9507,6 +9839,9 @@ func (s *CreateCampaignInput) Validate() error { 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")) } @@ -9582,6 +9917,9 @@ func (s *CreateExportJobInput) Validate() error { 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")) } @@ -9657,6 +9995,9 @@ func (s *CreateImportJobInput) Validate() error { 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")) } @@ -9732,6 +10073,9 @@ func (s *CreateSegmentInput) Validate() error { 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")) } @@ -9832,8 +10176,9 @@ type DefaultPushNotificationMessage struct { // data.pinpoint.jsonBody' object Data map[string]*string `type:"map"` - // Indicates if the message should display on the users device. Silent pushes - // can be used for Remote Configuration and Phone Home use cases. + // 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. @@ -9922,6 +10267,9 @@ func (s *DeleteAdmChannelInput) Validate() error { 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 @@ -9983,6 +10331,9 @@ func (s *DeleteApnsChannelInput) Validate() error { 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 @@ -10044,6 +10395,9 @@ func (s *DeleteApnsSandboxChannelInput) Validate() error { 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 @@ -10105,6 +10459,9 @@ func (s *DeleteApnsVoipChannelInput) Validate() error { 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 @@ -10166,6 +10523,9 @@ func (s *DeleteApnsVoipSandboxChannelInput) Validate() error { 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 @@ -10227,6 +10587,9 @@ func (s *DeleteAppInput) Validate() error { 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 @@ -10288,6 +10651,9 @@ func (s *DeleteBaiduChannelInput) Validate() error { 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 @@ -10352,9 +10718,15 @@ func (s *DeleteCampaignInput) Validate() error { 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 @@ -10422,6 +10794,9 @@ func (s *DeleteEmailChannelInput) Validate() error { 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 @@ -10486,9 +10861,15 @@ func (s *DeleteEndpointInput) Validate() error { 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 @@ -10556,6 +10937,9 @@ func (s *DeleteEventStreamInput) Validate() error { 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 @@ -10617,6 +11001,9 @@ func (s *DeleteGcmChannelInput) Validate() error { 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 @@ -10681,9 +11068,15 @@ func (s *DeleteSegmentInput) Validate() error { 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 @@ -10751,6 +11144,9 @@ func (s *DeleteSmsChannelInput) Validate() error { 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 @@ -10815,9 +11211,15 @@ func (s *DeleteUserEndpointsInput) Validate() error { 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 @@ -10862,6 +11264,70 @@ func (s *DeleteUserEndpointsOutput) SetEndpointsResponse(v *EndpointsResponse) * 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 { @@ -10883,11 +11349,17 @@ type DirectMessageConfiguration struct { // 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 @@ -10930,6 +11402,12 @@ func (s *DirectMessageConfiguration) SetDefaultPushNotificationMessage(v *Defaul 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 @@ -10942,10 +11420,20 @@ func (s *DirectMessageConfiguration) SetSMSMessage(v *SMSMessage) *DirectMessage 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"` @@ -10970,6 +11458,12 @@ 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 @@ -11001,6 +11495,10 @@ type EmailChannelResponse struct { // 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"` @@ -11058,6 +11556,12 @@ func (s *EmailChannelResponse) SetApplicationId(v string) *EmailChannelResponse 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 @@ -11136,6 +11640,87 @@ func (s *EmailChannelResponse) SetVersion(v int64) *EmailChannelResponse { 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"` @@ -11385,8 +11970,8 @@ func (s *EndpointDemographic) SetTimezone(v string) *EndpointDemographic { return s } -// The responses that are returned after you create or update an endpoint and -// record an event. +// A complex object that holds the status code and message as a result of processing +// an endpoint. type EndpointItemResponse struct { _ struct{} `type:"structure"` @@ -11394,8 +11979,8 @@ type EndpointItemResponse struct { // a response. Message *string `type:"string"` - // The status code to respond with for a particular endpoint id after endpoint - // registration + // The status code associated with the merging of an endpoint when issuing a + // response. StatusCode *int64 `type:"integer"` } @@ -11429,7 +12014,7 @@ type EndpointLocation struct { 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. + // 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. @@ -11505,14 +12090,14 @@ type EndpointMessageResult struct { // 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 Quiet Hours for the campaign.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. + // 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. @@ -11574,7 +12159,7 @@ func (s *EndpointMessageResult) SetUpdatedToken(v string) *EndpointMessageResult return s } -// Endpoint update request +// An endpoint update request. type EndpointRequest struct { _ struct{} `type:"structure"` @@ -12010,10 +12595,10 @@ type Event struct { // The name of the custom event that you're recording. EventType *string `type:"string"` - // Event metrics + // Custom metrics related to the event. Metrics map[string]*float64 `type:"map"` - // The session + // 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. @@ -12066,14 +12651,62 @@ func (s *Event) SetTimestamp(v string) *Event { return s } -// The responses that are returned after you record an event. +// 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 code to respond with for a particular event id + // 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"` } @@ -12174,14 +12807,14 @@ func (s *EventStream) SetRoleArn(v string) *EventStream { return s } -// Events batch definition +// A batch of PublicEndpoints and Events to process. type EventsBatch struct { _ struct{} `type:"structure"` - // Endpoint information + // The PublicEndpoint attached to the EndpointId from the request. Endpoint *PublicEndpoint `type:"structure"` - // Events + // An object that contains a set of events associated with the endpoint. Events map[string]*Event `type:"map"` } @@ -12207,13 +12840,12 @@ func (s *EventsBatch) SetEvents(v map[string]*Event) *EventsBatch { return s } -// Put Events request +// A set of events to process. type EventsRequest struct { _ struct{} `type:"structure"` - // Batch of events with endpoint id as the key and an object of EventsBatch - // as value. The EventsBatch object has the PublicEndpoint and a map of event - // Id's to events + // 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"` } @@ -12233,12 +12865,15 @@ func (s *EventsRequest) SetBatchItem(v map[string]*EventsBatch) *EventsRequest { return s } -// The results from processing a put events request +// Custom messages associated with events. type EventsResponse struct { _ struct{} `type:"structure"` - // A map containing a multi part response for each endpoint, with the endpoint - // id as the key and item response as the value + // 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"` } @@ -12974,6 +13609,9 @@ func (s *GetAdmChannelInput) Validate() error { 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 @@ -13035,6 +13673,9 @@ func (s *GetApnsChannelInput) Validate() error { 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 @@ -13096,6 +13737,9 @@ func (s *GetApnsSandboxChannelInput) Validate() error { 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 @@ -13157,6 +13801,9 @@ func (s *GetApnsVoipChannelInput) Validate() error { 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 @@ -13218,6 +13865,9 @@ func (s *GetApnsVoipSandboxChannelInput) Validate() error { 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 @@ -13279,6 +13929,9 @@ func (s *GetAppInput) Validate() error { 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 @@ -13340,6 +13993,9 @@ func (s *GetApplicationSettingsInput) Validate() error { 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 @@ -13456,6 +14112,9 @@ func (s *GetBaiduChannelInput) Validate() error { 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 @@ -13524,9 +14183,15 @@ func (s *GetCampaignActivitiesInput) Validate() error { 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 @@ -13609,9 +14274,15 @@ func (s *GetCampaignInput) Validate() error { 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 @@ -13685,12 +14356,21 @@ func (s *GetCampaignVersionInput) Validate() error { 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 @@ -13771,9 +14451,15 @@ func (s *GetCampaignVersionsInput) Validate() error { 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 @@ -13857,6 +14543,9 @@ func (s *GetCampaignsInput) Validate() error { 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 @@ -13930,6 +14619,9 @@ func (s *GetChannelsInput) Validate() error { 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 @@ -13991,6 +14683,9 @@ func (s *GetEmailChannelInput) Validate() error { 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 @@ -14055,9 +14750,15 @@ func (s *GetEndpointInput) Validate() error { 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 @@ -14125,6 +14826,9 @@ func (s *GetEventStreamInput) Validate() error { 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 @@ -14189,9 +14893,15 @@ func (s *GetExportJobInput) Validate() error { 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 @@ -14263,6 +14973,9 @@ func (s *GetExportJobsInput) Validate() error { 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 @@ -14336,6 +15049,9 @@ func (s *GetGcmChannelInput) Validate() error { 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 @@ -14400,9 +15116,15 @@ func (s *GetImportJobInput) Validate() error { 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 @@ -14474,6 +15196,9 @@ func (s *GetImportJobsInput) Validate() error { 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 @@ -14554,9 +15279,15 @@ func (s *GetSegmentExportJobsInput) Validate() error { 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 @@ -14643,9 +15374,15 @@ func (s *GetSegmentImportJobsInput) Validate() error { 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 @@ -14728,9 +15465,15 @@ func (s *GetSegmentInput) Validate() error { 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 @@ -14804,12 +15547,21 @@ func (s *GetSegmentVersionInput) Validate() error { 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 @@ -14890,9 +15642,15 @@ func (s *GetSegmentVersionsInput) Validate() error { 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 @@ -14976,6 +15734,9 @@ func (s *GetSegmentsInput) Validate() error { 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 @@ -15049,6 +15810,9 @@ func (s *GetSmsChannelInput) Validate() error { 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 @@ -15113,9 +15877,15 @@ func (s *GetUserEndpointsInput) Validate() error { 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 @@ -15160,6 +15930,70 @@ func (s *GetUserEndpointsOutput) SetEndpointsResponse(v *EndpointsResponse) *Get 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"` @@ -15527,15 +16361,16 @@ func (s *ImportJobsResponse) SetNextToken(v string) *ImportJobsResponse { return s } -// The endpoint and events combined response definition +// The response that's provided after registering the endpoint. type ItemResponse struct { _ struct{} `type:"structure"` - // Endpoint item response after endpoint registration + // The response received after the endpoint was accepted. EndpointItemResponse *EndpointItemResponse `type:"structure"` - // Events item response is a multipart response object per event Id, with eventId - // as the key and EventItemResponse object as the value + // 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"` } @@ -15590,7 +16425,8 @@ type Message struct { // The JSON payload used for a silent push. JsonBody *string `type:"string"` - // The URL that points to the media resource, for example a .mp4 or .gif file. + // 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 @@ -15945,14 +16781,14 @@ type MessageResult struct { // 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 Quiet Hours for the campaign.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. + // 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. @@ -16012,10 +16848,11 @@ func (s *MessageResult) SetUpdatedToken(v string) *MessageResult { type MetricDimension struct { _ struct{} `type:"structure"` - // GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL + // 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"` - // Value to be compared. + // The value to be compared. Value *float64 `type:"double"` } @@ -16041,7 +16878,7 @@ func (s *MetricDimension) SetValue(v float64) *MetricDimension { return s } -// Phone Number Information request. +// Phone Number Validate request. type NumberValidateRequest struct { _ struct{} `type:"structure"` @@ -16077,7 +16914,7 @@ func (s *NumberValidateRequest) SetPhoneNumber(v string) *NumberValidateRequest return s } -// Phone Number Information response. +// Phone Number Validate response. type NumberValidateResponse struct { _ struct{} `type:"structure"` @@ -16108,8 +16945,8 @@ type NumberValidateResponse struct { // The county where the phone number was originally registered. County *string `type:"string"` - // The two-character ISO code for the country or region that you included in - // the request body. + // 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. @@ -16227,7 +17064,7 @@ func (s *NumberValidateResponse) SetZipCode(v string) *NumberValidateResponse { type PhoneNumberValidateInput struct { _ struct{} `type:"structure" payload:"NumberValidateRequest"` - // Phone Number Information request. + // Phone Number Validate request. // // NumberValidateRequest is a required field NumberValidateRequest *NumberValidateRequest `type:"structure" required:"true"` @@ -16265,7 +17102,7 @@ func (s *PhoneNumberValidateInput) SetNumberValidateRequest(v *NumberValidateReq type PhoneNumberValidateOutput struct { _ struct{} `type:"structure" payload:"NumberValidateResponse"` - // Phone Number Information response. + // Phone Number Validate response. // // NumberValidateResponse is a required field NumberValidateResponse *NumberValidateResponse `type:"structure" required:"true"` @@ -16292,7 +17129,7 @@ type PublicEndpoint struct { _ struct{} `type:"structure"` // The unique identifier for the recipient. For example, an address could be - // a device token or an endpoint ID. + // 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 @@ -16305,7 +17142,7 @@ type PublicEndpoint struct { // The endpoint demographic attributes. Demographic *EndpointDemographic `type:"structure"` - // The date and time when the endpoint was last updated. + // 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 @@ -16434,6 +17271,9 @@ func (s *PutEventStreamInput) Validate() error { 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")) } @@ -16487,7 +17327,7 @@ type PutEventsInput struct { // ApplicationId is a required field ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - // Put Events request + // A set of events to process. // // EventsRequest is a required field EventsRequest *EventsRequest `type:"structure" required:"true"` @@ -16509,6 +17349,9 @@ func (s *PutEventsInput) Validate() error { 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")) } @@ -16534,7 +17377,7 @@ func (s *PutEventsInput) SetEventsRequest(v *EventsRequest) *PutEventsInput { type PutEventsOutput struct { _ struct{} `type:"structure" payload:"EventsResponse"` - // The results from processing a put events request + // Custom messages associated with events. // // EventsResponse is a required field EventsResponse *EventsResponse `type:"structure" required:"true"` @@ -16560,10 +17403,16 @@ func (s *PutEventsOutput) SetEventsResponse(v *EventsResponse) *PutEventsOutput type QuietTime struct { _ struct{} `type:"structure"` - // The default end time for quiet time in ISO 8601 format. + // 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 default start time for quiet time in ISO 8601 format. + // 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"` } @@ -16589,6 +17438,32 @@ func (s *QuietTime) SetStart(v string) *QuietTime { 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"` @@ -16656,9 +17531,15 @@ func (s *RemoveAttributesInput) Validate() error { 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")) } @@ -16976,15 +17857,29 @@ type Schedule struct { // The scheduled time that the campaign ends in ISO 8601 format. EndTime *string `type:"string"` - // How often the campaign delivers messages.Valid values: ONCE, HOURLY, DAILY, - // WEEKLY, MONTHLY + // 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 time during which the campaign sends no messages. + // 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. @@ -17011,6 +17906,12 @@ func (s *Schedule) SetEndTime(v string) *Schedule { 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 @@ -17214,7 +18115,9 @@ type SegmentGroup struct { // 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. + // 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 @@ -17377,7 +18280,7 @@ func (s *SegmentImportResource) SetSize(v int64) *SegmentImportResource { type SegmentLocation struct { _ struct{} `type:"structure"` - // The country filter according to ISO 3166-1 Alpha-2 codes. + // The country or region, in ISO 3166-1 alpha-2 format. Country *SetDimension `type:"structure"` // The GPS Point dimension. @@ -17613,6 +18516,9 @@ func (s *SendMessagesInput) Validate() error { 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")) } @@ -17790,6 +18696,9 @@ func (s *SendUsersMessagesInput) Validate() error { 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")) } @@ -17841,7 +18750,7 @@ func (s *SendUsersMessagesOutput) SetSendUsersMessageResponse(v *SendUsersMessag type Session struct { _ struct{} `type:"structure"` - // Session duration in millis + // The duration of the session, in milliseconds. Duration *int64 `type:"integer"` // A unique identifier for the session. @@ -17925,6 +18834,85 @@ func (s *SetDimension) SetValues(v []*string) *SetDimension { 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"` @@ -18034,6 +19022,9 @@ func (s *UpdateAdmChannelInput) Validate() error { 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 @@ -18109,6 +19100,9 @@ func (s *UpdateApnsChannelInput) Validate() error { 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 @@ -18184,6 +19178,9 @@ func (s *UpdateApnsSandboxChannelInput) Validate() error { 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 @@ -18259,6 +19256,9 @@ func (s *UpdateApnsVoipChannelInput) Validate() error { 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 @@ -18334,6 +19334,9 @@ func (s *UpdateApnsVoipSandboxChannelInput) Validate() error { 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 @@ -18406,6 +19409,9 @@ func (s *UpdateApplicationSettingsInput) Validate() error { 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")) } @@ -18505,6 +19511,9 @@ func (s *UpdateBaiduChannelInput) Validate() error { 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")) } @@ -18583,9 +19592,15 @@ func (s *UpdateCampaignInput) Validate() error { 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")) } @@ -18667,6 +19682,9 @@ func (s *UpdateEmailChannelInput) Validate() error { 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")) } @@ -18723,7 +19741,7 @@ type UpdateEndpointInput struct { // EndpointId is a required field EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` - // Endpoint update request + // An endpoint update request. // // EndpointRequest is a required field EndpointRequest *EndpointRequest `type:"structure" required:"true"` @@ -18745,9 +19763,15 @@ func (s *UpdateEndpointInput) Validate() error { 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")) } @@ -18829,6 +19853,9 @@ func (s *UpdateEndpointsBatchInput) Validate() error { 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")) } @@ -18904,6 +19931,9 @@ func (s *UpdateGcmChannelInput) Validate() error { 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")) } @@ -18982,9 +20012,15 @@ func (s *UpdateSegmentInput) Validate() error { 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")) } @@ -19066,6 +20102,9 @@ func (s *UpdateSmsChannelInput) Validate() error { 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")) } @@ -19113,6 +20152,272 @@ func (s *UpdateSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *U 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"` @@ -19123,14 +20428,25 @@ type WriteApplicationSettingsRequest struct { // The CloudWatchMetrics settings for the app. CloudWatchMetricsEnabled *bool `type:"boolean"` - // 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. + // 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. Each campaign for this app sends no messages - // during this time unless the campaign overrides the default with a quiet time - // of its own. + // 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"` } @@ -19504,6 +20820,9 @@ const ( // ChannelTypeSms is a ChannelType enum value ChannelTypeSms = "SMS" + // ChannelTypeVoice is a ChannelType enum value + ChannelTypeVoice = "VOICE" + // ChannelTypeEmail is a ChannelType enum value ChannelTypeEmail = "EMAIL" @@ -19559,6 +20878,14 @@ const ( 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" @@ -19582,6 +20909,9 @@ const ( // FrequencyMonthly is a Frequency enum value FrequencyMonthly = "MONTHLY" + + // FrequencyEvent is a Frequency enum value + FrequencyEvent = "EVENT" ) const ( 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 76c085513..89bf316df 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 @@ -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 @@ -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 } @@ -341,7 +339,7 @@ func (c *RDS) ApplyPendingMaintenanceActionRequest(input *ApplyPendingMaintenanc // The specified resource ID was not found. // // * 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 DB instance isn't in a valid state. @@ -531,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) { @@ -763,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. @@ -1152,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. @@ -1181,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) @@ -1203,6 +1205,101 @@ 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 @@ -1373,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. @@ -1488,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 @@ -2189,6 +2286,100 @@ 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 @@ -2334,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. @@ -2367,6 +2558,92 @@ 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 @@ -2406,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 } @@ -2636,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) { @@ -2660,6 +2941,90 @@ 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 @@ -2699,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 @@ -2786,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 } @@ -2877,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 @@ -2957,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 } @@ -3090,6 +3452,87 @@ func (c *RDS) DeleteEventSubscriptionWithContext(ctx aws.Context, input *DeleteE return out, req.Send() } +const opDeleteGlobalCluster = "DeleteGlobalCluster" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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 @@ -3129,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 } @@ -3417,6 +3859,85 @@ 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 @@ -4026,6 +4547,147 @@ 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 @@ -5627,6 +6289,144 @@ func (c *RDS) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEve return p.Err() } +const opDescribeGlobalClusters = "DescribeGlobalClusters" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/DescribeGlobalClusters +func (c *RDS) DescribeGlobalClustersRequest(input *DescribeGlobalClustersInput) (req *request.Request, output *DescribeGlobalClustersOutput) { + op := &request.Operation{ + Name: opDescribeGlobalClusters, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeGlobalClustersInput{} + } + + output = &DescribeGlobalClustersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeGlobalClusters API operation for Amazon Relational Database Service. +// +// 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 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() +} + +// DescribeGlobalClustersWithContext is the same as DescribeGlobalClusters with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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() +} + +// 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 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 DescribeGlobalClusters operation. +// pageNum := 0 +// err := client.DescribeGlobalClustersPages(params, +// func(page *DescribeGlobalClustersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RDS) DescribeGlobalClustersPages(input *DescribeGlobalClustersInput, fn func(*DescribeGlobalClustersOutput, bool) bool) error { + return c.DescribeGlobalClustersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// 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) 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 @@ -6742,7 +7542,7 @@ 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 DB instance isn't in a valid state. @@ -6935,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 @@ -7025,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 @@ -7080,6 +7880,98 @@ 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 @@ -7904,6 +8796,90 @@ 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 @@ -8136,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) { @@ -8337,6 +9313,92 @@ func (c *RDS) RebootDBInstanceWithContext(ctx aws.Context, input *RebootDBInstan return out, req.Send() } +const opRemoveFromGlobalCluster = "RemoveFromGlobalCluster" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/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 @@ -8376,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 } @@ -8404,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) { @@ -8549,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 } @@ -8864,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. @@ -9160,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. @@ -9655,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) { @@ -9836,7 +10899,7 @@ func (c *RDS) StartDBClusterRequest(input *StartDBClusterInput) (req *request.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. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" // The DB instance isn't in a valid state. @@ -9910,7 +10973,7 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // Starts an Amazon RDS DB instance that was stopped using the AWS console, // the stop-db-instance AWS CLI command, or the StopDBInstance action. // -// For more information, see Starting an Amazon RDS DB Instance That Was Previously +// 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. // @@ -9943,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 @@ -10052,7 +11115,7 @@ func (c *RDS) StopDBClusterRequest(input *StopDBClusterInput) (req *request.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 DB instance isn't in a valid state. @@ -10156,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) { @@ -11885,6 +12948,218 @@ func (s *CopyOptionGroupOutput) SetOptionGroup(v *OptionGroup) *CopyOptionGroupO return s } +type CreateDBClusterEndpointInput struct { + _ struct{} `type:"structure"` + + // The identifier to use for the new endpoint. This parameter is stored as a + // lowercase string. + // + // DBClusterEndpointIdentifier is a required field + DBClusterEndpointIdentifier *string `type:"string" required:"true"` + + // 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 type of the endpoint. One of: READER, ANY. + // + // EndpointType is a required field + EndpointType *string `type:"string" required:"true"` + + // 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"` @@ -11984,8 +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, serverless, or - // parallelquery. + // 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. @@ -11999,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 @@ -12258,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 @@ -12639,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. // @@ -13111,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 @@ -13295,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 // @@ -13716,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"` @@ -13735,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. @@ -13746,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 @@ -13859,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 @@ -13900,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 @@ -14096,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"` @@ -14708,6 +16004,110 @@ func (s *CreateEventSubscriptionOutput) SetEventSubscription(v *EventSubscriptio return s } +type CreateGlobalClusterInput struct { + _ struct{} `type:"structure"` + + // 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"` + + // 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"` + + // Provides the name of the database engine to be used for this DB cluster. + Engine *string `type:"string"` + + // The engine version of the Aurora global database. + EngineVersion *string `type:"string"` + + // 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 CreateGlobalClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGlobalClusterInput) GoString() string { + return s.String() +} + +// 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"` @@ -14865,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 @@ -14878,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"` @@ -14943,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"` @@ -15083,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 @@ -15185,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 @@ -15281,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"` @@ -16087,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"` @@ -16150,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 @@ -16384,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 @@ -16528,6 +18099,252 @@ func (s *DBInstance) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBIn return s } +// 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"` + + // Specifies the allocated storage size in gibibytes (GiB). + AllocatedStorage *int64 `type:"integer"` + + // 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"` + + // The Amazon Resource Name (ARN) for the automated backup. + DBInstanceArn *string `type:"string"` + + // The customer id of the instance that is/was associated with the automated + // backup. + DBInstanceIdentifier *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 automated backup is encrypted. + Encrypted *bool `type:"boolean"` + + // The name of the database engine for this automated backup. + Engine *string `type:"string"` + + // The version of the database engine for the automated backup. + EngineVersion *string `type:"string"` + + // True if mapping of AWS Identity and Access Management (IAM) accounts to database + // accounts is enabled, and otherwise false. + IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` + + // 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"` @@ -16855,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"` @@ -16971,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 @@ -17259,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"` @@ -17492,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"` @@ -17505,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 @@ -17515,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. // - // * Can't end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens. // // * 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. // @@ -17568,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 @@ -17732,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. @@ -17918,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"` @@ -18297,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"` @@ -19105,6 +21363,151 @@ func (s *DescribeDBEngineVersionsOutput) SetMarker(v string) *DescribeDBEngineVe 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 *DescribeDBInstanceAutomatedBackupsInput) SetMarker(v string) *DescribeDBInstanceAutomatedBackupsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBInstanceAutomatedBackupsInput) SetMaxRecords(v int64) *DescribeDBInstanceAutomatedBackupsInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBInstanceAutomatedBackups +// action. +type DescribeDBInstanceAutomatedBackupsOutput struct { + _ struct{} `type:"structure"` + + // 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 . + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBInstanceAutomatedBackupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBInstanceAutomatedBackupsOutput) GoString() string { + return s.String() +} + +// 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 *DescribeDBInstanceAutomatedBackupsOutput) SetMarker(v string) *DescribeDBInstanceAutomatedBackupsOutput { + s.Marker = &v + return s +} + type DescribeDBInstancesInput struct { _ struct{} `type:"structure"` @@ -19881,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"` @@ -19981,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 @@ -20761,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"` @@ -22127,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"` @@ -22448,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. // @@ -22467,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 @@ -22516,6 +25072,8 @@ func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterO // // * DescribeDBClusterBacktracks // +// * DescribeDBClusterEndpoints +// // * DescribeDBClusters // // * DescribeDBInstances @@ -22573,6 +25131,160 @@ func (s *Filter) SetValues(v []*string) *Filter { 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 +} + +// SetIsWriter sets the IsWriter field's value. +func (s *GlobalClusterMember) SetIsWriter(v bool) *GlobalClusterMember { + s.IsWriter = &v + return s +} + +// SetReaders sets the Readers field's value. +func (s *GlobalClusterMember) SetReaders(v []*string) *GlobalClusterMember { + s.Readers = v + return s +} + // This data type is used as a response element in the DescribeDBSecurityGroups // action. type IPRange struct { @@ -22872,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"` @@ -22933,6 +25837,21 @@ type ModifyDBClusterInput struct { // 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. // @@ -23093,6 +26012,12 @@ func (s *ModifyDBClusterInput) SetDeletionProtection(v bool) *ModifyDBClusterInp 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 @@ -23416,7 +26341,7 @@ 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 @@ -24619,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"` @@ -26540,6 +29546,62 @@ func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge 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 +} + type RemoveRoleFromDBClusterInput struct { _ struct{} `type:"structure"` @@ -28506,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 @@ -28696,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"` @@ -29536,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. // @@ -29584,6 +32658,11 @@ type RestoreDBInstanceToPointInTimeInput struct { // // 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 @@ -29599,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")) } @@ -29744,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 @@ -29786,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"` @@ -29811,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"` 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 0ca8c1eb2..2bfd71293 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,9 +329,16 @@ 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". // @@ -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 ebd22cb90..f24973901 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" @@ -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 @@ -322,6 +323,259 @@ 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 @@ -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) @@ -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) @@ -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. @@ -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. @@ -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) @@ -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. @@ -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. @@ -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. @@ -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. @@ -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,6 +1703,97 @@ 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 @@ -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. @@ -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) @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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,6 +2690,89 @@ func (c *Redshift) DeleteSnapshotCopyGrantWithContext(ctx aws.Context, input *De return out, req.Send() } +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/DeleteSnapshotSchedule +func (c *Redshift) DeleteSnapshotScheduleRequest(input *DeleteSnapshotScheduleInput) (req *request.Request, output *DeleteSnapshotScheduleOutput) { + op := &request.Operation{ + 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 @@ -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,6 +2857,80 @@ 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 @@ -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) @@ -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 @@ -5112,6 +5621,155 @@ 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 @@ -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) @@ -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) @@ -6198,6 +6866,86 @@ func (c *Redshift) ModifyClusterIamRolesWithContext(ctx aws.Context, input *Modi return out, req.Send() } +const opModifyClusterMaintenance = "ModifyClusterMaintenance" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/ModifyClusterMaintenance +func (c *Redshift) ModifyClusterMaintenanceRequest(input *ModifyClusterMaintenanceInput) (req *request.Request, output *ModifyClusterMaintenanceOutput) { + op := &request.Operation{ + Name: opModifyClusterMaintenance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClusterMaintenanceInput{} + } + + output = &ModifyClusterMaintenanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyClusterMaintenance API operation for Amazon Redshift. +// +// 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 ModifyClusterMaintenance for usage and error information. +// +// Returned Error Codes: +// * 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/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 @@ -6286,6 +7034,180 @@ 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 @@ -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,6 +7520,92 @@ func (c *Redshift) ModifySnapshotCopyRetentionPeriodWithContext(ctx aws.Context, return out, req.Send() } +const opModifySnapshotSchedule = "ModifySnapshotSchedule" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/ModifySnapshotSchedule +func (c *Redshift) ModifySnapshotScheduleRequest(input *ModifySnapshotScheduleInput) (req *request.Request, output *ModifySnapshotScheduleOutput) { + op := &request.Operation{ + Name: opModifySnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifySnapshotScheduleInput{} + } + + output = &ModifySnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifySnapshotSchedule API operation for Amazon Redshift. +// +// 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 ModifySnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidScheduleFault "InvalidSchedule" +// The schedule you submitted isn't valid. +// +// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" +// We could not find the specified snapshot schedule. +// +// * ErrCodeSnapshotScheduleUpdateInProgressFault "SnapshotScheduleUpdateInProgress" +// The specified snapshot schedule is already being updated. +// +// 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() +} + +// ModifySnapshotScheduleWithContext is the same as ModifySnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opPurchaseReservedNodeOffering = "PurchaseReservedNodeOffering" // PurchaseReservedNodeOfferingRequest generates a "aws/request.Request" representing the @@ -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 @@ -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) @@ -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"` @@ -7859,11 +8937,404 @@ func (s *AvailabilityZone) SetSupportedPlatforms(v []*SupportedPlatform) *Availa 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 +} + +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *BatchModifyClusterSnapshotsInput) SetManualSnapshotRetentionPeriod(v int64) *BatchModifyClusterSnapshotsInput { + s.ManualSnapshotRetentionPeriod = &v + return s +} + +// SetSnapshotIdentifierList sets the SnapshotIdentifierList field's value. +func (s *BatchModifyClusterSnapshotsInput) SetSnapshotIdentifierList(v []*string) *BatchModifyClusterSnapshotsInput { + s.SnapshotIdentifierList = v + return s +} + +type BatchModifyClusterSnapshotsOutput struct { + _ struct{} `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 BatchModifyClusterSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchModifyClusterSnapshotsOutput) GoString() string { + return s.String() +} + +// SetErrors sets the Errors field's value. +func (s *BatchModifyClusterSnapshotsOutput) SetErrors(v []*SnapshotErrorMessage) *BatchModifyClusterSnapshotsOutput { + s.Errors = v + return s +} + +// SetResources sets the Resources field's value. +func (s *BatchModifyClusterSnapshotsOutput) SetResources(v []*string) *BatchModifyClusterSnapshotsOutput { + s.Resources = v + return s +} + +type CancelResizeInput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the cluster that you want to cancel a resize operation + // for. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelResizeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelResizeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelResizeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelResizeInput"} + 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 *CancelResizeInput) SetClusterIdentifier(v string) *CancelResizeInput { + s.ClusterIdentifier = &v + return s +} + +// Describes the result of a cluster resize operation. +type CancelResizeOutput struct { + _ struct{} `type:"structure"` + + // 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"` + + // 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"` + + // 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 CancelResizeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelResizeOutput) GoString() string { + return s.String() +} + +// SetAvgResizeRateInMegaBytesPerSecond sets the AvgResizeRateInMegaBytesPerSecond field's value. +func (s *CancelResizeOutput) SetAvgResizeRateInMegaBytesPerSecond(v float64) *CancelResizeOutput { + s.AvgResizeRateInMegaBytesPerSecond = &v + return s +} + +// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. +func (s *CancelResizeOutput) SetElapsedTimeInSeconds(v int64) *CancelResizeOutput { + s.ElapsedTimeInSeconds = &v + return s +} + +// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. +func (s *CancelResizeOutput) SetEstimatedTimeToCompletionInSeconds(v int64) *CancelResizeOutput { + s.EstimatedTimeToCompletionInSeconds = &v + return s +} + +// SetImportTablesCompleted sets the ImportTablesCompleted field's value. +func (s *CancelResizeOutput) SetImportTablesCompleted(v []*string) *CancelResizeOutput { + s.ImportTablesCompleted = v + return s +} + +// SetImportTablesInProgress sets the ImportTablesInProgress field's value. +func (s *CancelResizeOutput) SetImportTablesInProgress(v []*string) *CancelResizeOutput { + s.ImportTablesInProgress = v + return s +} + +// SetImportTablesNotStarted sets the ImportTablesNotStarted field's value. +func (s *CancelResizeOutput) SetImportTablesNotStarted(v []*string) *CancelResizeOutput { + s.ImportTablesNotStarted = v + return s +} + +// SetMessage sets the Message field's value. +func (s *CancelResizeOutput) SetMessage(v string) *CancelResizeOutput { + s.Message = &v + return s +} + +// 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 +} + // Describes a cluster. 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,12 +9764,30 @@ func (s *Cluster) SetPubliclyAccessible(v bool) *Cluster { return s } +// 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 +} + // SetTags sets the Tags field's value. func (s *Cluster) SetTags(v []*Tag) *Cluster { s.Tags = v @@ -8704,6 +10245,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 +10276,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 +10410,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 +10481,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 +10704,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 +10801,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 +10960,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 +11008,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 +11271,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 +11333,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 +11487,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 +11964,133 @@ 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"` + + 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() +} + +// 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 +12163,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 +12281,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 +12354,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 +12408,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 @@ -10707,8 +12565,8 @@ 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"` @@ -10749,6 +12607,60 @@ func (s *DeleteClusterSnapshotInput) SetSnapshotIdentifier(v string) *DeleteClus return s } +type DeleteClusterSnapshotMessage 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 DeleteClusterSnapshotMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterSnapshotMessage) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterSnapshotMessage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSnapshotMessage"} + 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 *DeleteClusterSnapshotMessage) SetSnapshotClusterIdentifier(v string) *DeleteClusterSnapshotMessage { + s.SnapshotClusterIdentifier = &v + return s +} + +// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. +func (s *DeleteClusterSnapshotMessage) SetSnapshotIdentifier(v string) *DeleteClusterSnapshotMessage { + s.SnapshotIdentifier = &v + return s +} + type DeleteClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -11033,6 +12945,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 +13065,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 +13622,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 +13658,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 +13726,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 +15294,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. @@ -13507,6 +15545,164 @@ func (s *DescribeSnapshotCopyGrantsOutput) SetSnapshotCopyGrants(v []*SnapshotCo 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 DescribeSnapshotSchedulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotSchedulesOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeSnapshotSchedulesOutput) SetMarker(v string) *DescribeSnapshotSchedulesOutput { + s.Marker = &v + return s +} + +// SetSnapshotSchedules sets the SnapshotSchedules field's value. +func (s *DescribeSnapshotSchedulesOutput) SetSnapshotSchedules(v []*SnapshotSchedule) *DescribeSnapshotSchedulesOutput { + s.SnapshotSchedules = v + return s +} + +type DescribeStorageInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeStorageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStorageInput) GoString() string { + return s.String() +} + +type DescribeStorageOutput struct { + _ struct{} `type:"structure"` + + // The total amount of storage currently used for snapshots. + TotalBackupSizeInMegaBytes *float64 `type:"double"` + + // The total amount of storage currently provisioned. + TotalProvisionedStorageInMegaBytes *float64 `type:"double"` +} + +// String returns the string representation +func (s DescribeStorageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStorageOutput) GoString() string { + return s.String() +} + +// SetTotalBackupSizeInMegaBytes sets the TotalBackupSizeInMegaBytes field's value. +func (s *DescribeStorageOutput) SetTotalBackupSizeInMegaBytes(v float64) *DescribeStorageOutput { + s.TotalBackupSizeInMegaBytes = &v + return s +} + +// SetTotalProvisionedStorageInMegaBytes sets the TotalProvisionedStorageInMegaBytes field's value. +func (s *DescribeStorageOutput) SetTotalProvisionedStorageInMegaBytes(v float64) *DescribeStorageOutput { + s.TotalProvisionedStorageInMegaBytes = &v + return s +} + type DescribeTableRestoreStatusInput struct { _ struct{} `type:"structure"` @@ -14032,15 +16228,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 +16295,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 +16549,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 +16831,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 +17562,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 +17776,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 +17824,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 +18015,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 +18268,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 +18400,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 +18409,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 +18470,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 +18505,119 @@ 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"` + + 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() +} + +// 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 +19380,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 +19480,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 +19630,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 +19689,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 +19817,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 +19865,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 +20480,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 +20509,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 +20656,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 +20716,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 +20807,165 @@ 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"` + + 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() +} + +// 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 +21008,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 +21238,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 +21309,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 +21336,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 +21391,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 00fb70dae..4cb2a6778 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 dce53c7f2..b73e0deb5 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" @@ -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 @@ -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" @@ -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. @@ -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 @@ -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 @@ -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. @@ -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. @@ -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" @@ -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. // @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 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'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 @@ -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 @@ -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. @@ -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. @@ -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. @@ -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. @@ -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 @@ -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), @@ -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 @@ -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. @@ -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" @@ -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" @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. @@ -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. + // CloudFront distributionsYou 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. + // 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 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 Amazon EC2 instance, there are no special + // requirements. // - // If the environment contains a single EC2 instance, there are no special requirements. + // ELB load balancersHealth checking behavior depends on the type of load balancer: // - // * 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. + // 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. // - // 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. + // 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: // - // * We recommend that you set EvaluateTargetHealth to true only when you - // have enough idle capacity to handle the failure of one or more endpoints. + // 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 d37e10cde..a2e70bfc6 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 d5d617722..deb8e8964 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 @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 } @@ -1486,6 +1477,81 @@ 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 @@ -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 @@ -2544,6 +2610,81 @@ 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 @@ -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. @@ -3072,6 +3217,230 @@ func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, return out, req.Send() } +const opGetObjectLegalHold = "GetObjectLegalHold" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetObjectLegalHold +func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) { + op := &request.Operation{ + Name: opGetObjectLegalHold, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}/{Key+}?legal-hold", + } + + if input == nil { + input = &GetObjectLegalHoldInput{} + } + + output = &GetObjectLegalHoldOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetObjectLegalHold API operation for Amazon Simple Storage Service. +// +// 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 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() +} + +// GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetObjectLockConfiguration = "GetObjectLockConfiguration" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetObjectLockConfiguration +func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) { + op := &request.Operation{ + Name: opGetObjectLockConfiguration, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?object-lock", + } + + if input == nil { + input = &GetObjectLockConfigurationInput{} + } + + output = &GetObjectLockConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetObjectLockConfiguration API operation for Amazon Simple Storage Service. +// +// 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 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() +} + +// GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetObjectRetention = "GetObjectRetention" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetObjectRetention +func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) { + op := &request.Operation{ + Name: opGetObjectRetention, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}/{Key+}?retention", + } + + if input == nil { + input = &GetObjectRetentionInput{} + } + + output = &GetObjectRetentionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetObjectRetention API operation for Amazon Simple Storage Service. +// +// 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 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() +} + +// GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opGetObjectTagging = "GetObjectTagging" // GetObjectTaggingRequest generates a "aws/request.Request" representing the @@ -3220,6 +3589,80 @@ func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorren return out, req.Send() } +const opGetPublicAccessBlock = "GetPublicAccessBlock" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/GetPublicAccessBlock +func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) { + op := &request.Operation{ + Name: opGetPublicAccessBlock, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?publicAccessBlock", + } + + if input == nil { + input = &GetPublicAccessBlockInput{} + } + + output = &GetPublicAccessBlockOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPublicAccessBlock API operation for Amazon Simple Storage Service. +// +// 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 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() +} + +// GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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 opHeadBucket = "HeadBucket" // HeadBucketRequest generates a "aws/request.Request" representing the @@ -3259,8 +3702,7 @@ func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, ou output = &HeadBucketOutput{} 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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -5395,15 +5824,14 @@ 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). For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) +// 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 @@ -5473,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 } @@ -5553,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 } @@ -5629,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 } @@ -5706,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 } @@ -5897,6 +6321,230 @@ 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 @@ -5971,6 +6619,82 @@ func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggin 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: opPutPublicAccessBlock, + HTTPMethod: "PUT", + HTTPPath: "/{Bucket}?publicAccessBlock", + } + + if input == nil { + input = &PutPublicAccessBlockInput{} + } + + output = &PutPublicAccessBlockOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutPublicAccessBlock API operation for Amazon Simple Storage Service. +// +// 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 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() +} + +// PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of +// the ability to pass a context and additional request options. +// +// 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) 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() +} + const opRestoreObject = "RestoreObject" // RestoreObjectRequest generates a "aws/request.Request" representing the @@ -6347,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")) } @@ -6492,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"` @@ -7097,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. @@ -7110,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"` } @@ -7174,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"` } @@ -7236,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"` @@ -7349,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")) } @@ -7424,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). @@ -7679,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 @@ -7711,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 @@ -7725,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 @@ -7736,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). @@ -7776,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")) } @@ -7944,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 @@ -8037,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). @@ -8223,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 @@ -8241,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 @@ -8303,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"` @@ -8372,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 @@ -8386,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 @@ -8397,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). @@ -8431,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")) } @@ -8535,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 @@ -8628,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). @@ -8715,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"` @@ -8801,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")) } @@ -8867,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 @@ -8927,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 @@ -8984,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 @@ -9034,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")) } @@ -9100,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 @@ -9164,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")) } @@ -9244,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 @@ -9281,13 +10151,10 @@ func (s DeleteBucketPolicyOutput) GoString() string { type DeleteBucketReplicationInput struct { _ struct{} `type:"structure"` - // Deletes the replication subresource associated with the specified bucket. + // The bucket name. // - // There is usually some time lag before replication configuration deletion - // is fully propagated to all the Amazon S3 systems. - // - // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) - // in the Amazon S3 Developer Guide. + // 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"` @@ -9309,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 @@ -9366,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 @@ -9423,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 @@ -9522,8 +10398,8 @@ type DeleteMarkerReplication struct { // The status of the delete marker replication. // - // In the current implementation, Amazon S3 does not replicate the delete markers. - // Therefore, the status must be Disabled. + // In the current implementation, Amazon S3 doesn't replicate the delete markers. + // The status must be Disabled. Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"` } @@ -9549,6 +10425,10 @@ type DeleteObjectInput struct { // 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"` @@ -9582,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")) } @@ -9608,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 @@ -9705,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")) } @@ -9772,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/"` @@ -9802,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")) } @@ -9830,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 @@ -9888,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"` @@ -9934,42 +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 only in a cross-account scenario, where source and destination bucket - // owners are not the same, when you want 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. + // 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 Amazon S3 verifies this value - // only 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 tell Amazon S3 to change replica ownership - // to the AWS account that owns the destination bucket by adding the AccessControlTranslation - // element, this is the account ID of the destination bucket owner. + // 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 you have multiple rules in your replication configuration, all rules must - // specify the same bucket as the destination. A replication configuration can - // replicate objects only to one destination bucket. + // 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 that provides encryption-related information. You must specify - // this element if the SourceSelectionCriteria is specified. + // 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"` } @@ -10055,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 @@ -10099,12 +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 AWS KMS key for the region where the destination bucket resides. - // Amazon S3 uses this key 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"` } @@ -10237,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"` @@ -10298,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 @@ -10364,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 @@ -10445,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")) } @@ -10520,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 @@ -10588,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 @@ -10662,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")) } @@ -10737,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 @@ -10802,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 @@ -10867,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 @@ -10932,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 @@ -11007,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")) } @@ -11084,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 @@ -11127,6 +12134,9 @@ func (s *GetBucketPolicyInput) 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 @@ -11170,6 +12180,77 @@ func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput { return s } +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 GetBucketPolicyStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBucketPolicyStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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 + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput { + s.Bucket = &v + return s +} + +func (s *GetBucketPolicyStatusInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +type GetBucketPolicyStatusOutput struct { + _ struct{} `type:"structure" payload:"PolicyStatus"` + + // The policy status for the specified bucket. + PolicyStatus *PolicyStatus `type:"structure"` +} + +// String returns the string representation +func (s GetBucketPolicyStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBucketPolicyStatusOutput) GoString() string { + return s.String() +} + +// SetPolicyStatus sets the PolicyStatus field's value. +func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput { + s.PolicyStatus = v + return s +} + type GetBucketReplicationInput struct { _ struct{} `type:"structure"` @@ -11193,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 @@ -11216,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"` } @@ -11260,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 @@ -11326,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 @@ -11392,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 @@ -11469,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 @@ -11570,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")) } @@ -11721,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 @@ -11748,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")) } @@ -11889,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"` @@ -11949,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"` @@ -11974,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). @@ -12100,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 @@ -12172,6 +13482,115 @@ func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput 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) +} + +// GoString returns the string representation +func (s GetObjectRetentionInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetBucket sets the Bucket field's value. +func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput { + s.Bucket = &v + return s +} + +func (s *GetObjectRetentionInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetKey sets the Key field's value. +func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput { + s.Key = &v + return s +} + +// 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 *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput { + s.VersionId = &v + return s +} + +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 +} + type GetObjectTaggingInput struct { _ struct{} `type:"structure"` @@ -12200,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")) } @@ -12301,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")) } @@ -12371,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"` @@ -12552,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 @@ -12635,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 @@ -12662,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")) } @@ -12821,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"` @@ -12846,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). @@ -12957,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 @@ -13326,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"` } @@ -13585,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"` } @@ -13610,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"` @@ -14046,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 @@ -14157,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 @@ -14268,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 @@ -14446,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 @@ -14682,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 @@ -14914,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 @@ -15131,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 @@ -15376,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")) } @@ -16091,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"` @@ -16132,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"` @@ -16250,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"` } @@ -16389,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"` @@ -16603,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"` } @@ -16641,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"` } @@ -16722,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"` @@ -16755,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 @@ -16839,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)) @@ -16958,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")) } @@ -17038,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")) } @@ -17118,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")) } @@ -17201,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")) } @@ -17283,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)) @@ -17353,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)) @@ -17424,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")) } @@ -17507,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")) } @@ -17570,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/"` @@ -17593,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")) } @@ -17667,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")) } @@ -17742,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")) } @@ -17797,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/"` @@ -17820,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")) } @@ -17894,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")) } @@ -17968,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")) } @@ -18046,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")) } @@ -18121,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")) } @@ -18225,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")) } @@ -18401,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 @@ -18415,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 @@ -18426,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). @@ -18435,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 @@ -18460,6 +20297,9 @@ func (s *PutObjectInput) 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")) } @@ -18582,6 +20422,24 @@ func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput { 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 @@ -18643,6 +20501,227 @@ func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput { 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 PutObjectLegalHoldInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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")) + } + 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 *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput { + s.Bucket = &v + return s +} + +func (s *PutObjectLegalHoldInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetKey sets the Key field's value. +func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput { + s.Key = &v + return s +} + +// SetLegalHold sets the LegalHold field's value. +func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput { + s.LegalHold = v + return s +} + +// SetRequestPayer sets the RequestPayer field's value. +func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput { + s.RequestPayer = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput { + s.VersionId = &v + return s +} + +type PutObjectLegalHoldOutput 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 PutObjectLegalHoldOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutObjectLegalHoldOutput) GoString() string { + return s.String() +} + +// SetRequestCharged sets the RequestCharged field's value. +func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput { + s.RequestCharged = &v + return s +} + +type PutObjectLockConfigurationInput struct { + _ struct{} `type:"structure" payload:"ObjectLockConfiguration"` + + // 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"` + + // 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/"` + + // 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"` +} + +// String returns the string representation +func (s PutObjectLockConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutObjectLockConfigurationInput) GoString() string { + return s.String() +} + +// 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 +} + +// SetBucket sets the Bucket field's value. +func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput { + s.Bucket = &v + return s +} + +func (s *PutObjectLockConfigurationInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value. +func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput { + s.ObjectLockConfiguration = v + return s +} + +// SetRequestPayer sets the RequestPayer field's value. +func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput { + s.RequestPayer = &v + return s +} + +// SetToken sets the Token field's value. +func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput { + s.Token = &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"` +} + +// String returns the string representation +func (s PutObjectLockConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// 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 +} + type PutObjectOutput struct { _ struct{} `type:"structure"` @@ -18669,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). @@ -18737,6 +20816,137 @@ func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput { 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 +} + +// SetKey sets the Key field's value. +func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput { + s.Key = &v + return s +} + +// SetRequestPayer sets the RequestPayer field's value. +func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput { + s.RequestPayer = &v + return s +} + +// 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 *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"` @@ -18768,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")) } @@ -18842,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"` @@ -18919,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"` @@ -19122,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 one or more replication rules. 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"` @@ -19188,38 +21483,38 @@ 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"` // Specifies whether Amazon S3 should replicate delete makers. DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"` - // Container for replication destination information. + // A container for information about the replication destination. // // Destination is a required field Destination *Destination `type:"structure" required:"true"` - // Filter that identifies subset of objects to which the replication rule applies. - // A Filter must specify exactly one Prefix, Tag, or an And child element. + // 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"` - // Unique identifier for the rule. The value cannot be longer than 255 characters. + // 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. + // An object keyname prefix that identifies the object or objects to which the + // rule applies. The maximum prefix length is 1,024 characters. // // Deprecated: Prefix has been deprecated Prefix *string `deprecated:"true" type:"string"` // The priority associated with the rule. If you specify multiple rules in a - // replication configuration, then Amazon S3 applies rule priority in the event - // there are conflicts (two or more rules identify the same object based on - // filter specified). The rule with higher priority takes precedence. For example, + // 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. + // in multiple rules overlap // // * Same object qualify tag based filter criteria specified in multiple // rules @@ -19228,17 +21523,17 @@ type ReplicationRule struct { // in the Amazon S3 Developer Guide. Priority *int64 `type:"integer"` - // Container that describes additional filters in identifying source objects - // that you want to replicate. Currently, Amazon S3 supports only the filter + // 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. You can choose to enable or disable replication of - // these objects. + // 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. + // 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"` @@ -19383,29 +21678,29 @@ func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperat return s } -// Filter that identifies subset of objects to which the replication rule applies. -// A Filter must specify exactly one Prefix, Tag, or an And child element. +// 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"` - // Container for specifying rule filters. These filters determine the subset - // of objects to which the rule applies. The element is required only if you + // 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: // - // * You specify both a Prefix and a Tag filters. Then you wrap these in + // * If you specify both a Prefix and a Tag filter, wrap these filters in // an And tag. // - // * You specify filter based on multiple tags. Then you wrap the Tag elements + // * If you specify a filter based on multiple tags, wrap the Tag elements // in an And tag. And *ReplicationRuleAndOperator `type:"structure"` - // Object keyname prefix that identifies subset of objects to which the rule - // applies. + // An object keyname prefix that identifies the subset of objects to which the + // rule applies. Prefix *string `type:"string"` - // Container for specifying a tag key and value. + // A container for specifying a tag key and value. // - // The rule applies only to objects having the tag in its tagset. + // The rule applies only to objects that have the tag in their tag set. Tag *Tag `type:"structure"` } @@ -19556,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")) } @@ -19761,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"` @@ -19822,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. @@ -19917,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"` @@ -19925,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 @@ -19957,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"` } @@ -20194,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"` @@ -20212,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"` @@ -20222,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"` @@ -20235,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"` } @@ -20264,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")) } @@ -20494,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. // @@ -20630,13 +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. - // The element is required if you include SourceSelectionCriteria in the replication - // configuration. + // 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"` } @@ -20671,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"` @@ -20714,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"` } @@ -21035,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"` @@ -21119,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"` @@ -21243,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 @@ -21274,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 @@ -21303,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")) } @@ -21473,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). @@ -21576,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 @@ -21605,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")) } @@ -21726,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). @@ -22005,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" @@ -22033,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 ( @@ -22073,6 +24388,9 @@ const ( // InventoryFormatOrc is a InventoryFormat enum value InventoryFormatOrc = "ORC" + + // InventoryFormatParquet is a InventoryFormat enum value + InventoryFormatParquet = "Parquet" ) const ( @@ -22112,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 ( @@ -22169,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" @@ -22184,6 +24540,9 @@ const ( // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value ObjectStorageClassOnezoneIa = "ONEZONE_IA" + + // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value + ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING" ) const ( @@ -22308,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 ( @@ -22343,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 6f560a409..95f245636 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 @@ -33,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) 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 de5534156..1019d6f65 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 @@ -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. @@ -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 @@ -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 } @@ -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 } @@ -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 @@ -2662,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. @@ -2686,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 @@ -3655,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. @@ -3669,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"` @@ -4145,7 +4149,7 @@ 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. @@ -4188,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 @@ -5104,7 +5108,7 @@ 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 @@ -5150,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 @@ -5270,15 +5274,14 @@ 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. If you want to remove a label from a version, then do not specify this - // parameter. + // (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 you must also specify the RemoveFromVersionId parameter. + // 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"` - // Specifies the secret version ID of the version that the staging labels are + // 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. @@ -5305,7 +5308,7 @@ type UpdateSecretVersionStageInput struct { // 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"` @@ -5376,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/securityhub/api.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go new file mode 100644 index 000000000..6b8314364 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go @@ -0,0 +1,7805 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package securityhub + +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 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AcceptInvitation for more information on using the AcceptInvitation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AcceptInvitationRequest method. +// req, resp := client.AcceptInvitationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/AcceptInvitation +func (c *SecurityHub) AcceptInvitationRequest(input *AcceptInvitationInput) (req *request.Request, output *AcceptInvitationOutput) { + op := &request.Operation{ + Name: opAcceptInvitation, + HTTPMethod: "POST", + HTTPPath: "/master", + } + + if input == nil { + input = &AcceptInvitationInput{} + } + + output = &AcceptInvitationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AcceptInvitation API operation for AWS SecurityHub. +// +// Accepts the invitation to be monitored by a master SecurityHub 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 SecurityHub's +// API operation AcceptInvitation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/AcceptInvitation +func (c *SecurityHub) AcceptInvitation(input *AcceptInvitationInput) (*AcceptInvitationOutput, error) { + req, out := c.AcceptInvitationRequest(input) + return out, req.Send() +} + +// AcceptInvitationWithContext is the same as AcceptInvitation with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptInvitation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) AcceptInvitationWithContext(ctx aws.Context, input *AcceptInvitationInput, opts ...request.Option) (*AcceptInvitationOutput, error) { + req, out := c.AcceptInvitationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opBatchDisableStandards = "BatchDisableStandards" + +// BatchDisableStandardsRequest generates a "aws/request.Request" representing the +// client's request for the BatchDisableStandards operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchDisableStandards for more information on using the BatchDisableStandards +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchDisableStandardsRequest method. +// req, resp := client.BatchDisableStandardsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchDisableStandards +func (c *SecurityHub) BatchDisableStandardsRequest(input *BatchDisableStandardsInput) (req *request.Request, output *BatchDisableStandardsOutput) { + op := &request.Operation{ + Name: opBatchDisableStandards, + HTTPMethod: "POST", + HTTPPath: "/standards/deregister", + } + + if input == nil { + input = &BatchDisableStandardsInput{} + } + + output = &BatchDisableStandardsOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchDisableStandards API operation for AWS SecurityHub. +// +// Disables the standards specified by the standards subscription ARNs. In the +// context of Security Hub, supported standards (for example, CIS AWS Foundations) +// are automated and continuous checks that help determine your compliance status +// against security industry (including AWS) best practices. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation BatchDisableStandards for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchDisableStandards +func (c *SecurityHub) BatchDisableStandards(input *BatchDisableStandardsInput) (*BatchDisableStandardsOutput, error) { + req, out := c.BatchDisableStandardsRequest(input) + return out, req.Send() +} + +// BatchDisableStandardsWithContext is the same as BatchDisableStandards with the addition of +// the ability to pass a context and additional request options. +// +// See BatchDisableStandards for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) BatchDisableStandardsWithContext(ctx aws.Context, input *BatchDisableStandardsInput, opts ...request.Option) (*BatchDisableStandardsOutput, error) { + req, out := c.BatchDisableStandardsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opBatchEnableStandards = "BatchEnableStandards" + +// BatchEnableStandardsRequest generates a "aws/request.Request" representing the +// client's request for the BatchEnableStandards operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchEnableStandards for more information on using the BatchEnableStandards +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchEnableStandardsRequest method. +// req, resp := client.BatchEnableStandardsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchEnableStandards +func (c *SecurityHub) BatchEnableStandardsRequest(input *BatchEnableStandardsInput) (req *request.Request, output *BatchEnableStandardsOutput) { + op := &request.Operation{ + Name: opBatchEnableStandards, + HTTPMethod: "POST", + HTTPPath: "/standards/register", + } + + if input == nil { + input = &BatchEnableStandardsInput{} + } + + output = &BatchEnableStandardsOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchEnableStandards API operation for AWS SecurityHub. +// +// Enables the standards specified by the standards ARNs. In the context of +// Security Hub, supported standards (for example, CIS AWS Foundations) are +// automated and continuous checks that help determine your compliance status +// against security industry (including AWS) best practices. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation BatchEnableStandards for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchEnableStandards +func (c *SecurityHub) BatchEnableStandards(input *BatchEnableStandardsInput) (*BatchEnableStandardsOutput, error) { + req, out := c.BatchEnableStandardsRequest(input) + return out, req.Send() +} + +// BatchEnableStandardsWithContext is the same as BatchEnableStandards with the addition of +// the ability to pass a context and additional request options. +// +// See BatchEnableStandards for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) BatchEnableStandardsWithContext(ctx aws.Context, input *BatchEnableStandardsInput, opts ...request.Option) (*BatchEnableStandardsOutput, error) { + req, out := c.BatchEnableStandardsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opBatchImportFindings = "BatchImportFindings" + +// BatchImportFindingsRequest generates a "aws/request.Request" representing the +// client's request for the BatchImportFindings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchImportFindings for more information on using the BatchImportFindings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchImportFindingsRequest method. +// req, resp := client.BatchImportFindingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchImportFindings +func (c *SecurityHub) BatchImportFindingsRequest(input *BatchImportFindingsInput) (req *request.Request, output *BatchImportFindingsOutput) { + op := &request.Operation{ + Name: opBatchImportFindings, + HTTPMethod: "POST", + HTTPPath: "/findings/import", + } + + if input == nil { + input = &BatchImportFindingsInput{} + } + + output = &BatchImportFindingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchImportFindings API operation for AWS SecurityHub. +// +// Imports security findings that are generated by the integrated third-party +// products into Security Hub. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation BatchImportFindings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchImportFindings +func (c *SecurityHub) BatchImportFindings(input *BatchImportFindingsInput) (*BatchImportFindingsOutput, error) { + req, out := c.BatchImportFindingsRequest(input) + return out, req.Send() +} + +// BatchImportFindingsWithContext is the same as BatchImportFindings with the addition of +// the ability to pass a context and additional request options. +// +// See BatchImportFindings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) BatchImportFindingsWithContext(ctx aws.Context, input *BatchImportFindingsInput, opts ...request.Option) (*BatchImportFindingsOutput, error) { + req, out := c.BatchImportFindingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateInsight = "CreateInsight" + +// CreateInsightRequest generates a "aws/request.Request" representing the +// client's request for the CreateInsight operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateInsight for more information on using the CreateInsight +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateInsightRequest method. +// req, resp := client.CreateInsightRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/CreateInsight +func (c *SecurityHub) CreateInsightRequest(input *CreateInsightInput) (req *request.Request, output *CreateInsightOutput) { + op := &request.Operation{ + Name: opCreateInsight, + HTTPMethod: "POST", + HTTPPath: "/insights", + } + + if input == nil { + input = &CreateInsightInput{} + } + + output = &CreateInsightOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateInsight API operation for AWS SecurityHub. +// +// Creates an insight, which is a consolidation of findings that identifies +// a security area that requires attention or intervention. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation CreateInsight for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/CreateInsight +func (c *SecurityHub) CreateInsight(input *CreateInsightInput) (*CreateInsightOutput, error) { + req, out := c.CreateInsightRequest(input) + return out, req.Send() +} + +// CreateInsightWithContext is the same as CreateInsight with the addition of +// the ability to pass a context and additional request options. +// +// See CreateInsight for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) CreateInsightWithContext(ctx aws.Context, input *CreateInsightInput, opts ...request.Option) (*CreateInsightOutput, error) { + req, out := c.CreateInsightRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateMembers for more information on using the CreateMembers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateMembersRequest method. +// req, resp := client.CreateMembersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/CreateMembers +func (c *SecurityHub) CreateMembersRequest(input *CreateMembersInput) (req *request.Request, output *CreateMembersOutput) { + op := &request.Operation{ + Name: opCreateMembers, + HTTPMethod: "POST", + HTTPPath: "/members", + } + + if input == nil { + input = &CreateMembersInput{} + } + + output = &CreateMembersOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateMembers API operation for AWS SecurityHub. +// +// Creates member Security Hub accounts in the current AWS account (which becomes +// the master Security Hub account) that has Security Hub enabled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation CreateMembers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/CreateMembers +func (c *SecurityHub) CreateMembers(input *CreateMembersInput) (*CreateMembersOutput, error) { + req, out := c.CreateMembersRequest(input) + return out, req.Send() +} + +// CreateMembersWithContext is the same as CreateMembers with the addition of +// the ability to pass a context and additional request options. +// +// See CreateMembers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) CreateMembersWithContext(ctx aws.Context, input *CreateMembersInput, opts ...request.Option) (*CreateMembersOutput, error) { + req, out := c.CreateMembersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeclineInvitations for more information on using the DeclineInvitations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeclineInvitationsRequest method. +// req, resp := client.DeclineInvitationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeclineInvitations +func (c *SecurityHub) DeclineInvitationsRequest(input *DeclineInvitationsInput) (req *request.Request, output *DeclineInvitationsOutput) { + op := &request.Operation{ + Name: opDeclineInvitations, + HTTPMethod: "POST", + HTTPPath: "/invitations/decline", + } + + if input == nil { + input = &DeclineInvitationsInput{} + } + + output = &DeclineInvitationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeclineInvitations API operation for AWS SecurityHub. +// +// Declines invitations that are sent to this AWS account (invitee) by the AWS +// accounts (inviters) that are specified by the account IDs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation DeclineInvitations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeclineInvitations +func (c *SecurityHub) DeclineInvitations(input *DeclineInvitationsInput) (*DeclineInvitationsOutput, error) { + req, out := c.DeclineInvitationsRequest(input) + return out, req.Send() +} + +// DeclineInvitationsWithContext is the same as DeclineInvitations with the addition of +// the ability to pass a context and additional request options. +// +// See DeclineInvitations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) DeclineInvitationsWithContext(ctx aws.Context, input *DeclineInvitationsInput, opts ...request.Option) (*DeclineInvitationsOutput, error) { + req, out := c.DeclineInvitationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteInsight = "DeleteInsight" + +// DeleteInsightRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInsight operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteInsight for more information on using the DeleteInsight +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteInsightRequest method. +// req, resp := client.DeleteInsightRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteInsight +func (c *SecurityHub) DeleteInsightRequest(input *DeleteInsightInput) (req *request.Request, output *DeleteInsightOutput) { + op := &request.Operation{ + Name: opDeleteInsight, + HTTPMethod: "DELETE", + HTTPPath: "/insights/{InsightArn+}", + } + + if input == nil { + input = &DeleteInsightInput{} + } + + output = &DeleteInsightOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteInsight API operation for AWS SecurityHub. +// +// Deletes an insight that is specified by the insight 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 +// the error. +// +// See the AWS API reference guide for AWS SecurityHub's +// API operation DeleteInsight for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteInsight +func (c *SecurityHub) DeleteInsight(input *DeleteInsightInput) (*DeleteInsightOutput, error) { + req, out := c.DeleteInsightRequest(input) + return out, req.Send() +} + +// DeleteInsightWithContext is the same as DeleteInsight with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInsight for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) DeleteInsightWithContext(ctx aws.Context, input *DeleteInsightInput, opts ...request.Option) (*DeleteInsightOutput, error) { + req, out := c.DeleteInsightRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteInvitations for more information on using the DeleteInvitations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteInvitationsRequest method. +// req, resp := client.DeleteInvitationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteInvitations +func (c *SecurityHub) DeleteInvitationsRequest(input *DeleteInvitationsInput) (req *request.Request, output *DeleteInvitationsOutput) { + op := &request.Operation{ + Name: opDeleteInvitations, + HTTPMethod: "POST", + HTTPPath: "/invitations/delete", + } + + if input == nil { + input = &DeleteInvitationsInput{} + } + + output = &DeleteInvitationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteInvitations API operation for AWS SecurityHub. +// +// Deletes invitations that are sent to this AWS account (invitee) by the AWS +// accounts (inviters) that are specified by their account IDs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation DeleteInvitations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteInvitations +func (c *SecurityHub) DeleteInvitations(input *DeleteInvitationsInput) (*DeleteInvitationsOutput, error) { + req, out := c.DeleteInvitationsRequest(input) + return out, req.Send() +} + +// DeleteInvitationsWithContext is the same as DeleteInvitations with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInvitations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) DeleteInvitationsWithContext(ctx aws.Context, input *DeleteInvitationsInput, opts ...request.Option) (*DeleteInvitationsOutput, error) { + req, out := c.DeleteInvitationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteMembers for more information on using the DeleteMembers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteMembersRequest method. +// req, resp := client.DeleteMembersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteMembers +func (c *SecurityHub) DeleteMembersRequest(input *DeleteMembersInput) (req *request.Request, output *DeleteMembersOutput) { + op := &request.Operation{ + Name: opDeleteMembers, + HTTPMethod: "POST", + HTTPPath: "/members/delete", + } + + if input == nil { + input = &DeleteMembersInput{} + } + + output = &DeleteMembersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteMembers API operation for AWS SecurityHub. +// +// Deletes the Security Hub member accounts that are specified by the account +// IDs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation DeleteMembers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteMembers +func (c *SecurityHub) DeleteMembers(input *DeleteMembersInput) (*DeleteMembersOutput, error) { + req, out := c.DeleteMembersRequest(input) + return out, req.Send() +} + +// DeleteMembersWithContext is the same as DeleteMembers with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteMembers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) DeleteMembersWithContext(ctx aws.Context, input *DeleteMembersInput, opts ...request.Option) (*DeleteMembersOutput, error) { + req, out := c.DeleteMembersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableImportFindingsForProduct = "DisableImportFindingsForProduct" + +// DisableImportFindingsForProductRequest generates a "aws/request.Request" representing the +// client's request for the DisableImportFindingsForProduct operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisableImportFindingsForProduct for more information on using the DisableImportFindingsForProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisableImportFindingsForProductRequest method. +// req, resp := client.DisableImportFindingsForProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisableImportFindingsForProduct +func (c *SecurityHub) DisableImportFindingsForProductRequest(input *DisableImportFindingsForProductInput) (req *request.Request, output *DisableImportFindingsForProductOutput) { + op := &request.Operation{ + Name: opDisableImportFindingsForProduct, + HTTPMethod: "DELETE", + HTTPPath: "/productSubscriptions/{ProductSubscriptionArn+}", + } + + if input == nil { + input = &DisableImportFindingsForProductInput{} + } + + output = &DisableImportFindingsForProductOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisableImportFindingsForProduct API operation for AWS SecurityHub. +// +// Stops you from being able to import findings generated by integrated third-party +// providers into Security Hub. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation DisableImportFindingsForProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisableImportFindingsForProduct +func (c *SecurityHub) DisableImportFindingsForProduct(input *DisableImportFindingsForProductInput) (*DisableImportFindingsForProductOutput, error) { + req, out := c.DisableImportFindingsForProductRequest(input) + return out, req.Send() +} + +// DisableImportFindingsForProductWithContext is the same as DisableImportFindingsForProduct with the addition of +// the ability to pass a context and additional request options. +// +// See DisableImportFindingsForProduct for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) DisableImportFindingsForProductWithContext(ctx aws.Context, input *DisableImportFindingsForProductInput, opts ...request.Option) (*DisableImportFindingsForProductOutput, error) { + req, out := c.DisableImportFindingsForProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableSecurityHub = "DisableSecurityHub" + +// DisableSecurityHubRequest generates a "aws/request.Request" representing the +// client's request for the DisableSecurityHub operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisableSecurityHub for more information on using the DisableSecurityHub +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisableSecurityHubRequest method. +// req, resp := client.DisableSecurityHubRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisableSecurityHub +func (c *SecurityHub) DisableSecurityHubRequest(input *DisableSecurityHubInput) (req *request.Request, output *DisableSecurityHubOutput) { + op := &request.Operation{ + Name: opDisableSecurityHub, + HTTPMethod: "DELETE", + HTTPPath: "/accounts", + } + + if input == nil { + input = &DisableSecurityHubInput{} + } + + output = &DisableSecurityHubOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisableSecurityHub API operation for AWS SecurityHub. +// +// Disables the AWS Security Hub 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 SecurityHub's +// API operation DisableSecurityHub for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisableSecurityHub +func (c *SecurityHub) DisableSecurityHub(input *DisableSecurityHubInput) (*DisableSecurityHubOutput, error) { + req, out := c.DisableSecurityHubRequest(input) + return out, req.Send() +} + +// DisableSecurityHubWithContext is the same as DisableSecurityHub with the addition of +// the ability to pass a context and additional request options. +// +// See DisableSecurityHub for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) DisableSecurityHubWithContext(ctx aws.Context, input *DisableSecurityHubInput, opts ...request.Option) (*DisableSecurityHubOutput, error) { + req, out := c.DisableSecurityHubRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateFromMasterAccount for more information on using the DisassociateFromMasterAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateFromMasterAccountRequest method. +// req, resp := client.DisassociateFromMasterAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisassociateFromMasterAccount +func (c *SecurityHub) DisassociateFromMasterAccountRequest(input *DisassociateFromMasterAccountInput) (req *request.Request, output *DisassociateFromMasterAccountOutput) { + op := &request.Operation{ + Name: opDisassociateFromMasterAccount, + HTTPMethod: "POST", + HTTPPath: "/master/disassociate", + } + + if input == nil { + input = &DisassociateFromMasterAccountInput{} + } + + output = &DisassociateFromMasterAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateFromMasterAccount API operation for AWS SecurityHub. +// +// Disassociates the current Security Hub member account from its master 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 SecurityHub's +// API operation DisassociateFromMasterAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisassociateFromMasterAccount +func (c *SecurityHub) DisassociateFromMasterAccount(input *DisassociateFromMasterAccountInput) (*DisassociateFromMasterAccountOutput, error) { + req, out := c.DisassociateFromMasterAccountRequest(input) + return out, req.Send() +} + +// DisassociateFromMasterAccountWithContext is the same as DisassociateFromMasterAccount with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateFromMasterAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) DisassociateFromMasterAccountWithContext(ctx aws.Context, input *DisassociateFromMasterAccountInput, opts ...request.Option) (*DisassociateFromMasterAccountOutput, error) { + req, out := c.DisassociateFromMasterAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateMembers for more information on using the DisassociateMembers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateMembersRequest method. +// req, resp := client.DisassociateMembersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisassociateMembers +func (c *SecurityHub) DisassociateMembersRequest(input *DisassociateMembersInput) (req *request.Request, output *DisassociateMembersOutput) { + op := &request.Operation{ + Name: opDisassociateMembers, + HTTPMethod: "POST", + HTTPPath: "/members/disassociate", + } + + if input == nil { + input = &DisassociateMembersInput{} + } + + output = &DisassociateMembersOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateMembers API operation for AWS SecurityHub. +// +// Disassociates the Security Hub member accounts that are specified by the +// account IDs from their master 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 SecurityHub's +// API operation DisassociateMembers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisassociateMembers +func (c *SecurityHub) DisassociateMembers(input *DisassociateMembersInput) (*DisassociateMembersOutput, error) { + req, out := c.DisassociateMembersRequest(input) + return out, req.Send() +} + +// DisassociateMembersWithContext is the same as DisassociateMembers with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateMembers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) DisassociateMembersWithContext(ctx aws.Context, input *DisassociateMembersInput, opts ...request.Option) (*DisassociateMembersOutput, error) { + req, out := c.DisassociateMembersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEnableImportFindingsForProduct = "EnableImportFindingsForProduct" + +// EnableImportFindingsForProductRequest generates a "aws/request.Request" representing the +// client's request for the EnableImportFindingsForProduct operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EnableImportFindingsForProduct for more information on using the EnableImportFindingsForProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EnableImportFindingsForProductRequest method. +// req, resp := client.EnableImportFindingsForProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/EnableImportFindingsForProduct +func (c *SecurityHub) EnableImportFindingsForProductRequest(input *EnableImportFindingsForProductInput) (req *request.Request, output *EnableImportFindingsForProductOutput) { + op := &request.Operation{ + Name: opEnableImportFindingsForProduct, + HTTPMethod: "POST", + HTTPPath: "/productSubscriptions", + } + + if input == nil { + input = &EnableImportFindingsForProductInput{} + } + + output = &EnableImportFindingsForProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// EnableImportFindingsForProduct API operation for AWS SecurityHub. +// +// Enables you to import findings generated by integrated third-party providers +// into Security Hub. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation EnableImportFindingsForProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// 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/securityhub-2018-10-26/EnableImportFindingsForProduct +func (c *SecurityHub) EnableImportFindingsForProduct(input *EnableImportFindingsForProductInput) (*EnableImportFindingsForProductOutput, error) { + req, out := c.EnableImportFindingsForProductRequest(input) + return out, req.Send() +} + +// EnableImportFindingsForProductWithContext is the same as EnableImportFindingsForProduct with the addition of +// the ability to pass a context and additional request options. +// +// See EnableImportFindingsForProduct for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) EnableImportFindingsForProductWithContext(ctx aws.Context, input *EnableImportFindingsForProductInput, opts ...request.Option) (*EnableImportFindingsForProductOutput, error) { + req, out := c.EnableImportFindingsForProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEnableSecurityHub = "EnableSecurityHub" + +// EnableSecurityHubRequest generates a "aws/request.Request" representing the +// client's request for the EnableSecurityHub operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EnableSecurityHub for more information on using the EnableSecurityHub +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EnableSecurityHubRequest method. +// req, resp := client.EnableSecurityHubRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/EnableSecurityHub +func (c *SecurityHub) EnableSecurityHubRequest(input *EnableSecurityHubInput) (req *request.Request, output *EnableSecurityHubOutput) { + op := &request.Operation{ + Name: opEnableSecurityHub, + HTTPMethod: "POST", + HTTPPath: "/accounts", + } + + if input == nil { + input = &EnableSecurityHubInput{} + } + + output = &EnableSecurityHubOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// EnableSecurityHub API operation for AWS SecurityHub. +// +// Enables the AWS Security Hub 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 SecurityHub's +// API operation EnableSecurityHub for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/EnableSecurityHub +func (c *SecurityHub) EnableSecurityHub(input *EnableSecurityHubInput) (*EnableSecurityHubOutput, error) { + req, out := c.EnableSecurityHubRequest(input) + return out, req.Send() +} + +// EnableSecurityHubWithContext is the same as EnableSecurityHub with the addition of +// the ability to pass a context and additional request options. +// +// See EnableSecurityHub for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) EnableSecurityHubWithContext(ctx aws.Context, input *EnableSecurityHubInput, opts ...request.Option) (*EnableSecurityHubOutput, error) { + req, out := c.EnableSecurityHubRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetEnabledStandards = "GetEnabledStandards" + +// GetEnabledStandardsRequest generates a "aws/request.Request" representing the +// client's request for the GetEnabledStandards operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetEnabledStandards for more information on using the GetEnabledStandards +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetEnabledStandardsRequest method. +// req, resp := client.GetEnabledStandardsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetEnabledStandards +func (c *SecurityHub) GetEnabledStandardsRequest(input *GetEnabledStandardsInput) (req *request.Request, output *GetEnabledStandardsOutput) { + op := &request.Operation{ + Name: opGetEnabledStandards, + HTTPMethod: "POST", + HTTPPath: "/standards/get", + } + + if input == nil { + input = &GetEnabledStandardsInput{} + } + + output = &GetEnabledStandardsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetEnabledStandards API operation for AWS SecurityHub. +// +// Lists and describes enabled standards. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation GetEnabledStandards for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetEnabledStandards +func (c *SecurityHub) GetEnabledStandards(input *GetEnabledStandardsInput) (*GetEnabledStandardsOutput, error) { + req, out := c.GetEnabledStandardsRequest(input) + return out, req.Send() +} + +// GetEnabledStandardsWithContext is the same as GetEnabledStandards with the addition of +// the ability to pass a context and additional request options. +// +// See GetEnabledStandards for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) GetEnabledStandardsWithContext(ctx aws.Context, input *GetEnabledStandardsInput, opts ...request.Option) (*GetEnabledStandardsOutput, error) { + req, out := c.GetEnabledStandardsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetFindings for more information on using the GetFindings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetFindingsRequest method. +// req, resp := client.GetFindingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetFindings +func (c *SecurityHub) GetFindingsRequest(input *GetFindingsInput) (req *request.Request, output *GetFindingsOutput) { + op := &request.Operation{ + Name: opGetFindings, + HTTPMethod: "POST", + HTTPPath: "/findings", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetFindingsInput{} + } + + output = &GetFindingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFindings API operation for AWS SecurityHub. +// +// Lists and describes Security Hub-aggregated findings that are specified by +// filter 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 AWS SecurityHub's +// API operation GetFindings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetFindings +func (c *SecurityHub) GetFindings(input *GetFindingsInput) (*GetFindingsOutput, error) { + req, out := c.GetFindingsRequest(input) + return out, req.Send() +} + +// GetFindingsWithContext is the same as GetFindings with the addition of +// the ability to pass a context and additional request options. +// +// See GetFindings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) GetFindingsWithContext(ctx aws.Context, input *GetFindingsInput, opts ...request.Option) (*GetFindingsOutput, error) { + req, out := c.GetFindingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetFindingsPages iterates over the pages of a GetFindings operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetFindings 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 GetFindings operation. +// pageNum := 0 +// err := client.GetFindingsPages(params, +// func(page *GetFindingsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SecurityHub) GetFindingsPages(input *GetFindingsInput, fn func(*GetFindingsOutput, bool) bool) error { + return c.GetFindingsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetFindingsPagesWithContext same as GetFindingsPages 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 *SecurityHub) GetFindingsPagesWithContext(ctx aws.Context, input *GetFindingsInput, fn func(*GetFindingsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetFindingsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetFindingsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetFindingsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetInsightResults = "GetInsightResults" + +// GetInsightResultsRequest generates a "aws/request.Request" representing the +// client's request for the GetInsightResults operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetInsightResults for more information on using the GetInsightResults +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetInsightResultsRequest method. +// req, resp := client.GetInsightResultsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInsightResults +func (c *SecurityHub) GetInsightResultsRequest(input *GetInsightResultsInput) (req *request.Request, output *GetInsightResultsOutput) { + op := &request.Operation{ + Name: opGetInsightResults, + HTTPMethod: "GET", + HTTPPath: "/insights/results/{InsightArn+}", + } + + if input == nil { + input = &GetInsightResultsInput{} + } + + output = &GetInsightResultsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetInsightResults API operation for AWS SecurityHub. +// +// Lists the results of the Security Hub insight specified by the insight 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 +// the error. +// +// See the AWS API reference guide for AWS SecurityHub's +// API operation GetInsightResults for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInsightResults +func (c *SecurityHub) GetInsightResults(input *GetInsightResultsInput) (*GetInsightResultsOutput, error) { + req, out := c.GetInsightResultsRequest(input) + return out, req.Send() +} + +// GetInsightResultsWithContext is the same as GetInsightResults with the addition of +// the ability to pass a context and additional request options. +// +// See GetInsightResults for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) GetInsightResultsWithContext(ctx aws.Context, input *GetInsightResultsInput, opts ...request.Option) (*GetInsightResultsOutput, error) { + req, out := c.GetInsightResultsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetInsights = "GetInsights" + +// GetInsightsRequest generates a "aws/request.Request" representing the +// client's request for the GetInsights operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetInsights for more information on using the GetInsights +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetInsightsRequest method. +// req, resp := client.GetInsightsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInsights +func (c *SecurityHub) GetInsightsRequest(input *GetInsightsInput) (req *request.Request, output *GetInsightsOutput) { + op := &request.Operation{ + Name: opGetInsights, + HTTPMethod: "POST", + HTTPPath: "/insights/get", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetInsightsInput{} + } + + output = &GetInsightsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetInsights API operation for AWS SecurityHub. +// +// Lists and describes insights that are specified by insight ARNs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation GetInsights for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInsights +func (c *SecurityHub) GetInsights(input *GetInsightsInput) (*GetInsightsOutput, error) { + req, out := c.GetInsightsRequest(input) + return out, req.Send() +} + +// GetInsightsWithContext is the same as GetInsights with the addition of +// the ability to pass a context and additional request options. +// +// See GetInsights for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) GetInsightsWithContext(ctx aws.Context, input *GetInsightsInput, opts ...request.Option) (*GetInsightsOutput, error) { + req, out := c.GetInsightsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetInsightsPages iterates over the pages of a GetInsights operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetInsights 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 GetInsights operation. +// pageNum := 0 +// err := client.GetInsightsPages(params, +// func(page *GetInsightsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SecurityHub) GetInsightsPages(input *GetInsightsInput, fn func(*GetInsightsOutput, bool) bool) error { + return c.GetInsightsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetInsightsPagesWithContext same as GetInsightsPages 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 *SecurityHub) GetInsightsPagesWithContext(ctx aws.Context, input *GetInsightsInput, fn func(*GetInsightsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetInsightsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetInsightsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetInsightsOutput), !p.HasNextPage()) + } + return p.Err() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetInvitationsCount for more information on using the GetInvitationsCount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetInvitationsCountRequest method. +// req, resp := client.GetInvitationsCountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInvitationsCount +func (c *SecurityHub) GetInvitationsCountRequest(input *GetInvitationsCountInput) (req *request.Request, output *GetInvitationsCountOutput) { + op := &request.Operation{ + Name: opGetInvitationsCount, + HTTPMethod: "GET", + HTTPPath: "/invitations/count", + } + + if input == nil { + input = &GetInvitationsCountInput{} + } + + output = &GetInvitationsCountOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetInvitationsCount API operation for AWS SecurityHub. +// +// Returns the count of all Security Hub membership invitations that were sent +// to the current member account, not including the currently accepted invitation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation GetInvitationsCount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInvitationsCount +func (c *SecurityHub) GetInvitationsCount(input *GetInvitationsCountInput) (*GetInvitationsCountOutput, error) { + req, out := c.GetInvitationsCountRequest(input) + return out, req.Send() +} + +// GetInvitationsCountWithContext is the same as GetInvitationsCount with the addition of +// the ability to pass a context and additional request options. +// +// See GetInvitationsCount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) GetInvitationsCountWithContext(ctx aws.Context, input *GetInvitationsCountInput, opts ...request.Option) (*GetInvitationsCountOutput, error) { + req, out := c.GetInvitationsCountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetMasterAccount for more information on using the GetMasterAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetMasterAccountRequest method. +// req, resp := client.GetMasterAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetMasterAccount +func (c *SecurityHub) GetMasterAccountRequest(input *GetMasterAccountInput) (req *request.Request, output *GetMasterAccountOutput) { + op := &request.Operation{ + Name: opGetMasterAccount, + HTTPMethod: "GET", + HTTPPath: "/master", + } + + if input == nil { + input = &GetMasterAccountInput{} + } + + output = &GetMasterAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetMasterAccount API operation for AWS SecurityHub. +// +// Provides the details for the Security Hub master account to the current member +// 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 SecurityHub's +// API operation GetMasterAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetMasterAccount +func (c *SecurityHub) GetMasterAccount(input *GetMasterAccountInput) (*GetMasterAccountOutput, error) { + req, out := c.GetMasterAccountRequest(input) + return out, req.Send() +} + +// GetMasterAccountWithContext is the same as GetMasterAccount with the addition of +// the ability to pass a context and additional request options. +// +// See GetMasterAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) GetMasterAccountWithContext(ctx aws.Context, input *GetMasterAccountInput, opts ...request.Option) (*GetMasterAccountOutput, error) { + req, out := c.GetMasterAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetMembers for more information on using the GetMembers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetMembersRequest method. +// req, resp := client.GetMembersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetMembers +func (c *SecurityHub) GetMembersRequest(input *GetMembersInput) (req *request.Request, output *GetMembersOutput) { + op := &request.Operation{ + Name: opGetMembers, + HTTPMethod: "POST", + HTTPPath: "/members/get", + } + + if input == nil { + input = &GetMembersInput{} + } + + output = &GetMembersOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetMembers API operation for AWS SecurityHub. +// +// Returns the details on the Security Hub member accounts that are specified +// by the account IDs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation GetMembers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetMembers +func (c *SecurityHub) GetMembers(input *GetMembersInput) (*GetMembersOutput, error) { + req, out := c.GetMembersRequest(input) + return out, req.Send() +} + +// GetMembersWithContext is the same as GetMembers with the addition of +// the ability to pass a context and additional request options. +// +// See GetMembers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) GetMembersWithContext(ctx aws.Context, input *GetMembersInput, opts ...request.Option) (*GetMembersOutput, error) { + req, out := c.GetMembersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InviteMembers for more information on using the InviteMembers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InviteMembersRequest method. +// req, resp := client.InviteMembersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/InviteMembers +func (c *SecurityHub) InviteMembersRequest(input *InviteMembersInput) (req *request.Request, output *InviteMembersOutput) { + op := &request.Operation{ + Name: opInviteMembers, + HTTPMethod: "POST", + HTTPPath: "/members/invite", + } + + if input == nil { + input = &InviteMembersInput{} + } + + output = &InviteMembersOutput{} + req = c.newRequest(op, input, output) + return +} + +// InviteMembers API operation for AWS SecurityHub. +// +// Invites other AWS accounts to enable Security Hub and become Security Hub +// member accounts. When an account accepts the invitation and becomes a member +// account, the master account can view Security Hub findings of the member +// 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 SecurityHub's +// API operation InviteMembers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/InviteMembers +func (c *SecurityHub) InviteMembers(input *InviteMembersInput) (*InviteMembersOutput, error) { + req, out := c.InviteMembersRequest(input) + return out, req.Send() +} + +// InviteMembersWithContext is the same as InviteMembers with the addition of +// the ability to pass a context and additional request options. +// +// See InviteMembers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) InviteMembersWithContext(ctx aws.Context, input *InviteMembersInput, opts ...request.Option) (*InviteMembersOutput, error) { + req, out := c.InviteMembersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListEnabledProductsForImport = "ListEnabledProductsForImport" + +// ListEnabledProductsForImportRequest generates a "aws/request.Request" representing the +// client's request for the ListEnabledProductsForImport operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListEnabledProductsForImport for more information on using the ListEnabledProductsForImport +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListEnabledProductsForImportRequest method. +// req, resp := client.ListEnabledProductsForImportRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListEnabledProductsForImport +func (c *SecurityHub) ListEnabledProductsForImportRequest(input *ListEnabledProductsForImportInput) (req *request.Request, output *ListEnabledProductsForImportOutput) { + op := &request.Operation{ + Name: opListEnabledProductsForImport, + HTTPMethod: "GET", + HTTPPath: "/productSubscriptions", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListEnabledProductsForImportInput{} + } + + output = &ListEnabledProductsForImportOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListEnabledProductsForImport API operation for AWS SecurityHub. +// +// Lists all Security Hub-integrated third-party findings providers. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 SecurityHub's +// API operation ListEnabledProductsForImport for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListEnabledProductsForImport +func (c *SecurityHub) ListEnabledProductsForImport(input *ListEnabledProductsForImportInput) (*ListEnabledProductsForImportOutput, error) { + req, out := c.ListEnabledProductsForImportRequest(input) + return out, req.Send() +} + +// ListEnabledProductsForImportWithContext is the same as ListEnabledProductsForImport with the addition of +// the ability to pass a context and additional request options. +// +// See ListEnabledProductsForImport for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) ListEnabledProductsForImportWithContext(ctx aws.Context, input *ListEnabledProductsForImportInput, opts ...request.Option) (*ListEnabledProductsForImportOutput, error) { + req, out := c.ListEnabledProductsForImportRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListEnabledProductsForImportPages iterates over the pages of a ListEnabledProductsForImport operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListEnabledProductsForImport 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 ListEnabledProductsForImport operation. +// pageNum := 0 +// err := client.ListEnabledProductsForImportPages(params, +// func(page *ListEnabledProductsForImportOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SecurityHub) ListEnabledProductsForImportPages(input *ListEnabledProductsForImportInput, fn func(*ListEnabledProductsForImportOutput, bool) bool) error { + return c.ListEnabledProductsForImportPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListEnabledProductsForImportPagesWithContext same as ListEnabledProductsForImportPages 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 *SecurityHub) ListEnabledProductsForImportPagesWithContext(ctx aws.Context, input *ListEnabledProductsForImportInput, fn func(*ListEnabledProductsForImportOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListEnabledProductsForImportInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListEnabledProductsForImportRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListEnabledProductsForImportOutput), !p.HasNextPage()) + } + return p.Err() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListInvitations for more information on using the ListInvitations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListInvitationsRequest method. +// req, resp := client.ListInvitationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListInvitations +func (c *SecurityHub) ListInvitationsRequest(input *ListInvitationsInput) (req *request.Request, output *ListInvitationsOutput) { + op := &request.Operation{ + Name: opListInvitations, + HTTPMethod: "GET", + HTTPPath: "/invitations", + } + + if input == nil { + input = &ListInvitationsInput{} + } + + output = &ListInvitationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListInvitations API operation for AWS SecurityHub. +// +// Lists all Security Hub membership invitations that were sent to the current +// 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 SecurityHub's +// API operation ListInvitations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListInvitations +func (c *SecurityHub) ListInvitations(input *ListInvitationsInput) (*ListInvitationsOutput, error) { + req, out := c.ListInvitationsRequest(input) + return out, req.Send() +} + +// ListInvitationsWithContext is the same as ListInvitations with the addition of +// the ability to pass a context and additional request options. +// +// See ListInvitations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) ListInvitationsWithContext(ctx aws.Context, input *ListInvitationsInput, opts ...request.Option) (*ListInvitationsOutput, error) { + req, out := c.ListInvitationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListMembers for more information on using the ListMembers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListMembersRequest method. +// req, resp := client.ListMembersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListMembers +func (c *SecurityHub) ListMembersRequest(input *ListMembersInput) (req *request.Request, output *ListMembersOutput) { + op := &request.Operation{ + Name: opListMembers, + HTTPMethod: "GET", + HTTPPath: "/members", + } + + if input == nil { + input = &ListMembersInput{} + } + + output = &ListMembersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListMembers API operation for AWS SecurityHub. +// +// Lists details about all member accounts for the current Security Hub master +// 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 SecurityHub's +// API operation ListMembers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListMembers +func (c *SecurityHub) ListMembers(input *ListMembersInput) (*ListMembersOutput, error) { + req, out := c.ListMembersRequest(input) + return out, req.Send() +} + +// ListMembersWithContext is the same as ListMembers with the addition of +// the ability to pass a context and additional request options. +// +// See ListMembers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) ListMembersWithContext(ctx aws.Context, input *ListMembersInput, opts ...request.Option) (*ListMembersOutput, error) { + req, out := c.ListMembersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFindings = "UpdateFindings" + +// UpdateFindingsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFindings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFindings for more information on using the UpdateFindings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFindingsRequest method. +// req, resp := client.UpdateFindingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/UpdateFindings +func (c *SecurityHub) UpdateFindingsRequest(input *UpdateFindingsInput) (req *request.Request, output *UpdateFindingsOutput) { + op := &request.Operation{ + Name: opUpdateFindings, + HTTPMethod: "PATCH", + HTTPPath: "/findings", + } + + if input == nil { + input = &UpdateFindingsInput{} + } + + output = &UpdateFindingsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateFindings API operation for AWS SecurityHub. +// +// Updates the AWS Security Hub-aggregated findings specified by the filter +// 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 AWS SecurityHub's +// API operation UpdateFindings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/UpdateFindings +func (c *SecurityHub) UpdateFindings(input *UpdateFindingsInput) (*UpdateFindingsOutput, error) { + req, out := c.UpdateFindingsRequest(input) + return out, req.Send() +} + +// UpdateFindingsWithContext is the same as UpdateFindings with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFindings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) UpdateFindingsWithContext(ctx aws.Context, input *UpdateFindingsInput, opts ...request.Option) (*UpdateFindingsOutput, error) { + req, out := c.UpdateFindingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateInsight = "UpdateInsight" + +// UpdateInsightRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInsight operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateInsight for more information on using the UpdateInsight +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateInsightRequest method. +// req, resp := client.UpdateInsightRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/UpdateInsight +func (c *SecurityHub) UpdateInsightRequest(input *UpdateInsightInput) (req *request.Request, output *UpdateInsightOutput) { + op := &request.Operation{ + Name: opUpdateInsight, + HTTPMethod: "PATCH", + HTTPPath: "/insights/{InsightArn+}", + } + + if input == nil { + input = &UpdateInsightInput{} + } + + output = &UpdateInsightOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateInsight API operation for AWS SecurityHub. +// +// Updates the AWS Security Hub insight specified by the insight 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 +// the error. +// +// See the AWS API reference guide for AWS SecurityHub's +// API operation UpdateInsight for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The request was rejected because the specified resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/UpdateInsight +func (c *SecurityHub) UpdateInsight(input *UpdateInsightInput) (*UpdateInsightOutput, error) { + req, out := c.UpdateInsightRequest(input) + return out, req.Send() +} + +// UpdateInsightWithContext is the same as UpdateInsight with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateInsight for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) UpdateInsightWithContext(ctx aws.Context, input *UpdateInsightInput, opts ...request.Option) (*UpdateInsightOutput, error) { + req, out := c.UpdateInsightRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AcceptInvitationInput struct { + _ struct{} `type:"structure"` + + // The ID of the invitation that is sent to the AWS account by the Security + // Hub master account. + InvitationId *string `type:"string"` + + // The account ID of the master Security Hub account whose invitation you're + // accepting. + MasterId *string `type:"string"` +} + +// String returns the string representation +func (s AcceptInvitationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptInvitationInput) GoString() string { + return s.String() +} + +// SetInvitationId sets the InvitationId field's value. +func (s *AcceptInvitationInput) SetInvitationId(v string) *AcceptInvitationInput { + s.InvitationId = &v + return s +} + +// SetMasterId sets the MasterId field's value. +func (s *AcceptInvitationInput) SetMasterId(v string) *AcceptInvitationInput { + s.MasterId = &v + return s +} + +type AcceptInvitationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AcceptInvitationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptInvitationOutput) GoString() string { + return s.String() +} + +// The details of an AWS account. +type AccountDetails struct { + _ struct{} `type:"structure"` + + // The ID of an AWS account. + AccountId *string `type:"string"` + + // The email of an AWS account. + Email *string `type:"string"` +} + +// String returns the string representation +func (s AccountDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountDetails) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *AccountDetails) SetAccountId(v string) *AccountDetails { + s.AccountId = &v + return s +} + +// SetEmail sets the Email field's value. +func (s *AccountDetails) SetEmail(v string) *AccountDetails { + s.Email = &v + return s +} + +// The details of an AWS EC2 instance. +type AwsEc2InstanceDetails struct { + _ struct{} `type:"structure"` + + // The IAM profile ARN of the instance. + IamInstanceProfileArn *string `type:"string"` + + // The Amazon Machine Image (AMI) ID of the instance. + ImageId *string `type:"string"` + + // The IPv4 addresses associated with the instance. + IpV4Addresses []*string `type:"list"` + + // The IPv6 addresses associated with the instance. + IpV6Addresses []*string `type:"list"` + + // The key name associated with the instance. + KeyName *string `type:"string"` + + // The date/time the instance was launched. + LaunchedAt *string `type:"string"` + + // The identifier of the subnet in which the instance was launched. + SubnetId *string `type:"string"` + + // The instance type of the instance. + Type *string `type:"string"` + + // The identifier of the VPC in which the instance was launched. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s AwsEc2InstanceDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsEc2InstanceDetails) GoString() string { + return s.String() +} + +// SetIamInstanceProfileArn sets the IamInstanceProfileArn field's value. +func (s *AwsEc2InstanceDetails) SetIamInstanceProfileArn(v string) *AwsEc2InstanceDetails { + s.IamInstanceProfileArn = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *AwsEc2InstanceDetails) SetImageId(v string) *AwsEc2InstanceDetails { + s.ImageId = &v + return s +} + +// SetIpV4Addresses sets the IpV4Addresses field's value. +func (s *AwsEc2InstanceDetails) SetIpV4Addresses(v []*string) *AwsEc2InstanceDetails { + s.IpV4Addresses = v + return s +} + +// SetIpV6Addresses sets the IpV6Addresses field's value. +func (s *AwsEc2InstanceDetails) SetIpV6Addresses(v []*string) *AwsEc2InstanceDetails { + s.IpV6Addresses = v + return s +} + +// SetKeyName sets the KeyName field's value. +func (s *AwsEc2InstanceDetails) SetKeyName(v string) *AwsEc2InstanceDetails { + s.KeyName = &v + return s +} + +// SetLaunchedAt sets the LaunchedAt field's value. +func (s *AwsEc2InstanceDetails) SetLaunchedAt(v string) *AwsEc2InstanceDetails { + s.LaunchedAt = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *AwsEc2InstanceDetails) SetSubnetId(v string) *AwsEc2InstanceDetails { + s.SubnetId = &v + return s +} + +// SetType sets the Type field's value. +func (s *AwsEc2InstanceDetails) SetType(v string) *AwsEc2InstanceDetails { + s.Type = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *AwsEc2InstanceDetails) SetVpcId(v string) *AwsEc2InstanceDetails { + s.VpcId = &v + return s +} + +// AWS IAM access key details related to a finding. +type AwsIamAccessKeyDetails struct { + _ struct{} `type:"structure"` + + // The creation date/time of the IAM access key related to a finding. + CreatedAt *string `type:"string"` + + // The status of the IAM access key related to a finding. + Status *string `type:"string" enum:"AwsIamAccessKeyStatus"` + + // The user associated with the IAM access key related to a finding. + UserName *string `type:"string"` +} + +// String returns the string representation +func (s AwsIamAccessKeyDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsIamAccessKeyDetails) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *AwsIamAccessKeyDetails) SetCreatedAt(v string) *AwsIamAccessKeyDetails { + s.CreatedAt = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AwsIamAccessKeyDetails) SetStatus(v string) *AwsIamAccessKeyDetails { + s.Status = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *AwsIamAccessKeyDetails) SetUserName(v string) *AwsIamAccessKeyDetails { + s.UserName = &v + return s +} + +// The details of an AWS S3 Bucket. +type AwsS3BucketDetails struct { + _ struct{} `type:"structure"` + + // The canonical user ID of the owner of the S3 bucket. + OwnerId *string `type:"string"` + + // The display name of the owner of the S3 bucket. + OwnerName *string `type:"string"` +} + +// String returns the string representation +func (s AwsS3BucketDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsS3BucketDetails) GoString() string { + return s.String() +} + +// SetOwnerId sets the OwnerId field's value. +func (s *AwsS3BucketDetails) SetOwnerId(v string) *AwsS3BucketDetails { + s.OwnerId = &v + return s +} + +// SetOwnerName sets the OwnerName field's value. +func (s *AwsS3BucketDetails) SetOwnerName(v string) *AwsS3BucketDetails { + s.OwnerName = &v + return s +} + +// Provides consistent format for the contents of the Security Hub-aggregated +// findings. AwsSecurityFinding format enables you to share findings between +// AWS security services and third-party solutions, and compliance checks. +// +// A finding is a potential security issue generated either by AWS services +// (GuardDuty, Inspector, Macie) or by the integrated third-party solutions +// and compliance checks. +type AwsSecurityFinding struct { + _ struct{} `type:"structure"` + + // The AWS account ID in which a finding is generated. + // + // AwsAccountId is a required field + AwsAccountId *string `type:"string" required:"true"` + + // This data type is exclusive to findings that are generated as the result + // of a check run against a specific rule in a supported standard (for example, + // AWS CIS Foundations). Contains compliance-related finding details. + Compliance *Compliance `type:"structure"` + + // A finding's confidence. Confidence is defined as the likelihood that a finding + // accurately identifies the behavior or issue that it was intended to identify. + // Confidence is scored on a 0-100 basis using a ratio scale. 0 equates zero + // percent confidence and 100 equates to 100 percent confidence. + Confidence *int64 `type:"integer"` + + // An ISO8601-formatted timestamp that indicates when the potential security + // issue captured by a finding was created by the security findings provider. + // + // CreatedAt is a required field + CreatedAt *string `type:"string" required:"true"` + + // The level of importance assigned to the resources associated with the finding. + // A score of 0 means the underlying resources have no criticality, and a score + // of 100 is reserved for the most critical resources. + Criticality *int64 `type:"integer"` + + // A finding's description. + Description *string `type:"string"` + + // An ISO8601-formatted timestamp that indicates when the potential security + // issue captured by a finding was first observed by the security findings provider. + FirstObservedAt *string `type:"string"` + + // This is the identifier for the solution-specific component (a discrete unit + // of logic) that generated a finding. In various security findings provider's + // solutions, this generator can be called a rule, a check, a detector, a plug-in, + // etc. + // + // GeneratorId is a required field + GeneratorId *string `type:"string" required:"true"` + + // The security findings provider-specific identifier for a finding. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // An ISO8601-formatted timestamp that indicates when the potential security + // issue captured by a finding was most recently observed by the security findings + // provider. + LastObservedAt *string `type:"string"` + + // A list of malware related to a finding. + Malware []*Malware `type:"list"` + + // The details of network-related information about a finding. + Network *Network `type:"structure"` + + // A user-defined note added to a finding. + Note *Note `type:"structure"` + + // The details of process-related information about a finding. + Process *ProcessDetails `type:"structure"` + + // The ARN generated by Security Hub that uniquely identifies a third-party + // company (security findings provider) once this provider's product (solution + // that generates findings) is registered with Security Hub. + // + // ProductArn is a required field + ProductArn *string `type:"string" required:"true"` + + // A data type where security findings providers can include additional solution-specific + // details that are not part of the defined AwsSecurityFinding format. + ProductFields map[string]*string `type:"map"` + + // The record state of a finding. + RecordState *string `type:"string" enum:"RecordState"` + + // A list of related findings. + RelatedFindings []*RelatedFinding `type:"list"` + + // An data type that describes the remediation options for a finding. + Remediation *Remediation `type:"structure"` + + // A set of resource data types that describe the resources to which the finding + // refers. + // + // Resources is a required field + Resources []*Resource `type:"list" required:"true"` + + // The schema version for which a finding is formatted. + // + // SchemaVersion is a required field + SchemaVersion *string `type:"string" required:"true"` + + // A finding's severity. + // + // Severity is a required field + Severity *Severity `type:"structure" required:"true"` + + // A URL that links to a page about the current finding in the security findings + // provider's solution. + SourceUrl *string `type:"string"` + + // Threat intel details related to a finding. + ThreatIntelIndicators []*ThreatIntelIndicator `type:"list"` + + // A finding's title. + Title *string `type:"string"` + + // One or more finding types in the format of 'namespace/category/classifier' + // that classify a finding. + // + // Valid namespace values are: Software and Configuration Checks | TTPs | Effects + // | Unusual Behaviors | Sensitive Data Identifications + // + // Types is a required field + Types []*string `type:"list" required:"true"` + + // An ISO8601-formatted timestamp that indicates when the finding record was + // last updated by the security findings provider. + // + // UpdatedAt is a required field + UpdatedAt *string `type:"string" required:"true"` + + // A list of name/value string pairs associated with the finding. These are + // custom, user-defined fields added to a finding. + UserDefinedFields map[string]*string `type:"map"` + + // Indicates the veracity of a finding. + VerificationState *string `type:"string" enum:"VerificationState"` + + // The workflow state of a finding. + WorkflowState *string `type:"string" enum:"WorkflowState"` +} + +// String returns the string representation +func (s AwsSecurityFinding) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsSecurityFinding) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsSecurityFinding) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsSecurityFinding"} + if s.AwsAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AwsAccountId")) + } + if s.CreatedAt == nil { + invalidParams.Add(request.NewErrParamRequired("CreatedAt")) + } + if s.GeneratorId == nil { + invalidParams.Add(request.NewErrParamRequired("GeneratorId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.ProductArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProductArn")) + } + if s.Resources == nil { + invalidParams.Add(request.NewErrParamRequired("Resources")) + } + if s.SchemaVersion == nil { + invalidParams.Add(request.NewErrParamRequired("SchemaVersion")) + } + if s.Severity == nil { + invalidParams.Add(request.NewErrParamRequired("Severity")) + } + if s.Types == nil { + invalidParams.Add(request.NewErrParamRequired("Types")) + } + if s.UpdatedAt == nil { + invalidParams.Add(request.NewErrParamRequired("UpdatedAt")) + } + if s.Malware != nil { + for i, v := range s.Malware { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Malware", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Note != nil { + if err := s.Note.Validate(); err != nil { + invalidParams.AddNested("Note", err.(request.ErrInvalidParams)) + } + } + if s.RelatedFindings != nil { + for i, v := range s.RelatedFindings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RelatedFindings", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Resources != nil { + for i, v := range s.Resources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Resources", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Severity != nil { + if err := s.Severity.Validate(); err != nil { + invalidParams.AddNested("Severity", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *AwsSecurityFinding) SetAwsAccountId(v string) *AwsSecurityFinding { + s.AwsAccountId = &v + return s +} + +// SetCompliance sets the Compliance field's value. +func (s *AwsSecurityFinding) SetCompliance(v *Compliance) *AwsSecurityFinding { + s.Compliance = v + return s +} + +// SetConfidence sets the Confidence field's value. +func (s *AwsSecurityFinding) SetConfidence(v int64) *AwsSecurityFinding { + s.Confidence = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *AwsSecurityFinding) SetCreatedAt(v string) *AwsSecurityFinding { + s.CreatedAt = &v + return s +} + +// SetCriticality sets the Criticality field's value. +func (s *AwsSecurityFinding) SetCriticality(v int64) *AwsSecurityFinding { + s.Criticality = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *AwsSecurityFinding) SetDescription(v string) *AwsSecurityFinding { + s.Description = &v + return s +} + +// SetFirstObservedAt sets the FirstObservedAt field's value. +func (s *AwsSecurityFinding) SetFirstObservedAt(v string) *AwsSecurityFinding { + s.FirstObservedAt = &v + return s +} + +// SetGeneratorId sets the GeneratorId field's value. +func (s *AwsSecurityFinding) SetGeneratorId(v string) *AwsSecurityFinding { + s.GeneratorId = &v + return s +} + +// SetId sets the Id field's value. +func (s *AwsSecurityFinding) SetId(v string) *AwsSecurityFinding { + s.Id = &v + return s +} + +// SetLastObservedAt sets the LastObservedAt field's value. +func (s *AwsSecurityFinding) SetLastObservedAt(v string) *AwsSecurityFinding { + s.LastObservedAt = &v + return s +} + +// SetMalware sets the Malware field's value. +func (s *AwsSecurityFinding) SetMalware(v []*Malware) *AwsSecurityFinding { + s.Malware = v + return s +} + +// SetNetwork sets the Network field's value. +func (s *AwsSecurityFinding) SetNetwork(v *Network) *AwsSecurityFinding { + s.Network = v + return s +} + +// SetNote sets the Note field's value. +func (s *AwsSecurityFinding) SetNote(v *Note) *AwsSecurityFinding { + s.Note = v + return s +} + +// SetProcess sets the Process field's value. +func (s *AwsSecurityFinding) SetProcess(v *ProcessDetails) *AwsSecurityFinding { + s.Process = v + return s +} + +// SetProductArn sets the ProductArn field's value. +func (s *AwsSecurityFinding) SetProductArn(v string) *AwsSecurityFinding { + s.ProductArn = &v + return s +} + +// SetProductFields sets the ProductFields field's value. +func (s *AwsSecurityFinding) SetProductFields(v map[string]*string) *AwsSecurityFinding { + s.ProductFields = v + return s +} + +// SetRecordState sets the RecordState field's value. +func (s *AwsSecurityFinding) SetRecordState(v string) *AwsSecurityFinding { + s.RecordState = &v + return s +} + +// SetRelatedFindings sets the RelatedFindings field's value. +func (s *AwsSecurityFinding) SetRelatedFindings(v []*RelatedFinding) *AwsSecurityFinding { + s.RelatedFindings = v + return s +} + +// SetRemediation sets the Remediation field's value. +func (s *AwsSecurityFinding) SetRemediation(v *Remediation) *AwsSecurityFinding { + s.Remediation = v + return s +} + +// SetResources sets the Resources field's value. +func (s *AwsSecurityFinding) SetResources(v []*Resource) *AwsSecurityFinding { + s.Resources = v + return s +} + +// SetSchemaVersion sets the SchemaVersion field's value. +func (s *AwsSecurityFinding) SetSchemaVersion(v string) *AwsSecurityFinding { + s.SchemaVersion = &v + return s +} + +// SetSeverity sets the Severity field's value. +func (s *AwsSecurityFinding) SetSeverity(v *Severity) *AwsSecurityFinding { + s.Severity = v + return s +} + +// SetSourceUrl sets the SourceUrl field's value. +func (s *AwsSecurityFinding) SetSourceUrl(v string) *AwsSecurityFinding { + s.SourceUrl = &v + return s +} + +// SetThreatIntelIndicators sets the ThreatIntelIndicators field's value. +func (s *AwsSecurityFinding) SetThreatIntelIndicators(v []*ThreatIntelIndicator) *AwsSecurityFinding { + s.ThreatIntelIndicators = v + return s +} + +// SetTitle sets the Title field's value. +func (s *AwsSecurityFinding) SetTitle(v string) *AwsSecurityFinding { + s.Title = &v + return s +} + +// SetTypes sets the Types field's value. +func (s *AwsSecurityFinding) SetTypes(v []*string) *AwsSecurityFinding { + s.Types = v + return s +} + +// SetUpdatedAt sets the UpdatedAt field's value. +func (s *AwsSecurityFinding) SetUpdatedAt(v string) *AwsSecurityFinding { + s.UpdatedAt = &v + return s +} + +// SetUserDefinedFields sets the UserDefinedFields field's value. +func (s *AwsSecurityFinding) SetUserDefinedFields(v map[string]*string) *AwsSecurityFinding { + s.UserDefinedFields = v + return s +} + +// SetVerificationState sets the VerificationState field's value. +func (s *AwsSecurityFinding) SetVerificationState(v string) *AwsSecurityFinding { + s.VerificationState = &v + return s +} + +// SetWorkflowState sets the WorkflowState field's value. +func (s *AwsSecurityFinding) SetWorkflowState(v string) *AwsSecurityFinding { + s.WorkflowState = &v + return s +} + +// A collection of attributes that are applied to all active Security Hub-aggregated +// findings and that result in a subset of findings that are included in this +// insight. +type AwsSecurityFindingFilters struct { + _ struct{} `type:"structure"` + + // The AWS account ID in which a finding is generated. + AwsAccountId []*StringFilter `type:"list"` + + // The name of the findings provider (company) that owns the solution (product) + // that generates findings. + CompanyName []*StringFilter `type:"list"` + + // Exclusive to findings that are generated as the result of a check run against + // a specific rule in a supported standard (for example, AWS CIS Foundations). + // Contains compliance-related finding details. + ComplianceStatus []*StringFilter `type:"list"` + + // A finding's confidence. Confidence is defined as the likelihood that a finding + // accurately identifies the behavior or issue that it was intended to identify. + // Confidence is scored on a 0-100 basis using a ratio scale. 0 equates zero + // percent confidence and 100 equates to 100 percent confidence. + Confidence []*NumberFilter `type:"list"` + + // An ISO8601-formatted timestamp that indicates when the potential security + // issue captured by a finding was created by the security findings provider. + CreatedAt []*DateFilter `type:"list"` + + // The level of importance assigned to the resources associated with the finding. + // A score of 0 means the underlying resources have no criticality, and a score + // of 100 is reserved for the most critical resources. + Criticality []*NumberFilter `type:"list"` + + // A finding's description. + Description []*StringFilter `type:"list"` + + // An ISO8601-formatted timestamp that indicates when the potential security + // issue captured by a finding was first observed by the security findings provider. + FirstObservedAt []*DateFilter `type:"list"` + + // This is the identifier for the solution-specific component (a discrete unit + // of logic) that generated a finding. In various security findings provider's + // solutions, this generator can be called a rule, a check, a detector, a plug-in, + // etc. + GeneratorId []*StringFilter `type:"list"` + + // The security findings provider-specific identifier for a finding. + Id []*StringFilter `type:"list"` + + // A keyword for a finding. + Keyword []*KeywordFilter `type:"list"` + + // An ISO8601-formatted timestamp that indicates when the potential security + // issue captured by a finding was most recently observed by the security findings + // provider. + LastObservedAt []*DateFilter `type:"list"` + + // The name of the malware that was observed. + MalwareName []*StringFilter `type:"list"` + + // The filesystem path of the malware that was observed. + MalwarePath []*StringFilter `type:"list"` + + // The state of the malware that was observed. + MalwareState []*StringFilter `type:"list"` + + // The type of the malware that was observed. + MalwareType []*StringFilter `type:"list"` + + // The destination domain of network-related information about a finding. + NetworkDestinationDomain []*StringFilter `type:"list"` + + // The destination IPv4 address of network-related information about a finding. + NetworkDestinationIpV4 []*IpFilter `type:"list"` + + // The destination IPv6 address of network-related information about a finding. + NetworkDestinationIpV6 []*IpFilter `type:"list"` + + // The destination port of network-related information about a finding. + NetworkDestinationPort []*NumberFilter `type:"list"` + + // Indicates the direction of network traffic associated with a finding. + NetworkDirection []*StringFilter `type:"list"` + + // The protocol of network-related information about a finding. + NetworkProtocol []*StringFilter `type:"list"` + + // The source domain of network-related information about a finding. + NetworkSourceDomain []*StringFilter `type:"list"` + + // The source IPv4 address of network-related information about a finding. + NetworkSourceIpV4 []*IpFilter `type:"list"` + + // The source IPv6 address of network-related information about a finding. + NetworkSourceIpV6 []*IpFilter `type:"list"` + + // The source media access control (MAC) address of network-related information + // about a finding. + NetworkSourceMac []*StringFilter `type:"list"` + + // The source port of network-related information about a finding. + NetworkSourcePort []*NumberFilter `type:"list"` + + // The text of a note. + NoteText []*StringFilter `type:"list"` + + // The timestamp of when the note was updated. + NoteUpdatedAt []*DateFilter `type:"list"` + + // The principal that created a note. + NoteUpdatedBy []*StringFilter `type:"list"` + + // The date/time that the process was launched. + ProcessLaunchedAt []*DateFilter `type:"list"` + + // The name of the process. + ProcessName []*StringFilter `type:"list"` + + // The parent process ID. + ProcessParentPid []*NumberFilter `type:"list"` + + // The path to the process executable. + ProcessPath []*StringFilter `type:"list"` + + // The process ID. + ProcessPid []*NumberFilter `type:"list"` + + // The date/time that the process was terminated. + ProcessTerminatedAt []*DateFilter `type:"list"` + + // The ARN generated by Security Hub that uniquely identifies a third-party + // company (security findings provider) once this provider's product (solution + // that generates findings) is registered with Security Hub. + ProductArn []*StringFilter `type:"list"` + + // A data type where security findings providers can include additional solution-specific + // details that are not part of the defined AwsSecurityFinding format. + ProductFields []*MapFilter `type:"list"` + + // The name of the solution (product) that generates findings. + ProductName []*StringFilter `type:"list"` + + // The recommendation of what to do about the issue described in a finding. + RecommendationText []*StringFilter `type:"list"` + + // The updated record state for the finding. + RecordState []*StringFilter `type:"list"` + + // The solution-generated identifier for a related finding. + RelatedFindingsId []*StringFilter `type:"list"` + + // The ARN of the solution that generated a related finding. + RelatedFindingsProductArn []*StringFilter `type:"list"` + + // The IAM profile ARN of the instance. + ResourceAwsEc2InstanceIamInstanceProfileArn []*StringFilter `type:"list"` + + // The Amazon Machine Image (AMI) ID of the instance. + ResourceAwsEc2InstanceImageId []*StringFilter `type:"list"` + + // The IPv4 addresses associated with the instance. + ResourceAwsEc2InstanceIpV4Addresses []*IpFilter `type:"list"` + + // The IPv6 addresses associated with the instance. + ResourceAwsEc2InstanceIpV6Addresses []*IpFilter `type:"list"` + + // The key name associated with the instance. + ResourceAwsEc2InstanceKeyName []*StringFilter `type:"list"` + + // The date/time the instance was launched. + ResourceAwsEc2InstanceLaunchedAt []*DateFilter `type:"list"` + + // The identifier of the subnet in which the instance was launched. + ResourceAwsEc2InstanceSubnetId []*StringFilter `type:"list"` + + // The instance type of the instance. + ResourceAwsEc2InstanceType []*StringFilter `type:"list"` + + // The identifier of the VPC in which the instance was launched. + ResourceAwsEc2InstanceVpcId []*StringFilter `type:"list"` + + // The creation date/time of the IAM access key related to a finding. + ResourceAwsIamAccessKeyCreatedAt []*DateFilter `type:"list"` + + // The status of the IAM access key related to a finding. + ResourceAwsIamAccessKeyStatus []*StringFilter `type:"list"` + + // The user associated with the IAM access key related to a finding. + ResourceAwsIamAccessKeyUserName []*StringFilter `type:"list"` + + // The canonical user ID of the owner of the S3 bucket. + ResourceAwsS3BucketOwnerId []*StringFilter `type:"list"` + + // The display name of the owner of the S3 bucket. + ResourceAwsS3BucketOwnerName []*StringFilter `type:"list"` + + // The identifier of the image related to a finding. + ResourceContainerImageId []*StringFilter `type:"list"` + + // The name of the image related to a finding. + ResourceContainerImageName []*StringFilter `type:"list"` + + // The date/time that the container was started. + ResourceContainerLaunchedAt []*DateFilter `type:"list"` + + // The name of the container related to a finding. + ResourceContainerName []*StringFilter `type:"list"` + + // The details of a resource that does not have a specific sub-field for the + // resource type defined. + ResourceDetailsOther []*MapFilter `type:"list"` + + // The canonical identifier for the given resource type. + ResourceId []*StringFilter `type:"list"` + + // The canonical AWS partition name to which the region is assigned. + ResourcePartition []*StringFilter `type:"list"` + + // The canonical AWS external region name where this resource is located. + ResourceRegion []*StringFilter `type:"list"` + + // A list of AWS tags associated with a resource at the time the finding was + // processed. + ResourceTags []*MapFilter `type:"list"` + + // Specifies the type of the resource for which details are provided. + ResourceType []*StringFilter `type:"list"` + + // The label of a finding's severity. + SeverityLabel []*StringFilter `type:"list"` + + // The normalized severity of a finding. + SeverityNormalized []*NumberFilter `type:"list"` + + // The native severity as defined by the security findings provider's solution + // that generated the finding. + SeverityProduct []*NumberFilter `type:"list"` + + // A URL that links to a page about the current finding in the security findings + // provider's solution. + SourceUrl []*StringFilter `type:"list"` + + // The category of a threat intel indicator. + ThreatIntelIndicatorCategory []*StringFilter `type:"list"` + + // The date/time of the last observation of a threat intel indicator. + ThreatIntelIndicatorLastObservedAt []*DateFilter `type:"list"` + + // The source of the threat intel. + ThreatIntelIndicatorSource []*StringFilter `type:"list"` + + // The URL for more details from the source of the threat intel. + ThreatIntelIndicatorSourceUrl []*StringFilter `type:"list"` + + // The type of a threat intel indicator. + ThreatIntelIndicatorType []*StringFilter `type:"list"` + + // The value of a threat intel indicator. + ThreatIntelIndicatorValue []*StringFilter `type:"list"` + + // A finding's title. + Title []*StringFilter `type:"list"` + + // A finding type in the format of 'namespace/category/classifier' that classifies + // a finding. + Type []*StringFilter `type:"list"` + + // An ISO8601-formatted timestamp that indicates when the finding record was + // last updated by the security findings provider. + UpdatedAt []*DateFilter `type:"list"` + + // A list of name/value string pairs associated with the finding. These are + // custom, user-defined fields added to a finding. + UserDefinedFields []*MapFilter `type:"list"` + + // Indicates the veracity of a finding. + VerificationState []*StringFilter `type:"list"` + + // The workflow state of a finding. + WorkflowState []*StringFilter `type:"list"` +} + +// String returns the string representation +func (s AwsSecurityFindingFilters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsSecurityFindingFilters) GoString() string { + return s.String() +} + +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *AwsSecurityFindingFilters) SetAwsAccountId(v []*StringFilter) *AwsSecurityFindingFilters { + s.AwsAccountId = v + return s +} + +// SetCompanyName sets the CompanyName field's value. +func (s *AwsSecurityFindingFilters) SetCompanyName(v []*StringFilter) *AwsSecurityFindingFilters { + s.CompanyName = v + return s +} + +// SetComplianceStatus sets the ComplianceStatus field's value. +func (s *AwsSecurityFindingFilters) SetComplianceStatus(v []*StringFilter) *AwsSecurityFindingFilters { + s.ComplianceStatus = v + return s +} + +// SetConfidence sets the Confidence field's value. +func (s *AwsSecurityFindingFilters) SetConfidence(v []*NumberFilter) *AwsSecurityFindingFilters { + s.Confidence = v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *AwsSecurityFindingFilters) SetCreatedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.CreatedAt = v + return s +} + +// SetCriticality sets the Criticality field's value. +func (s *AwsSecurityFindingFilters) SetCriticality(v []*NumberFilter) *AwsSecurityFindingFilters { + s.Criticality = v + return s +} + +// SetDescription sets the Description field's value. +func (s *AwsSecurityFindingFilters) SetDescription(v []*StringFilter) *AwsSecurityFindingFilters { + s.Description = v + return s +} + +// SetFirstObservedAt sets the FirstObservedAt field's value. +func (s *AwsSecurityFindingFilters) SetFirstObservedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.FirstObservedAt = v + return s +} + +// SetGeneratorId sets the GeneratorId field's value. +func (s *AwsSecurityFindingFilters) SetGeneratorId(v []*StringFilter) *AwsSecurityFindingFilters { + s.GeneratorId = v + return s +} + +// SetId sets the Id field's value. +func (s *AwsSecurityFindingFilters) SetId(v []*StringFilter) *AwsSecurityFindingFilters { + s.Id = v + return s +} + +// SetKeyword sets the Keyword field's value. +func (s *AwsSecurityFindingFilters) SetKeyword(v []*KeywordFilter) *AwsSecurityFindingFilters { + s.Keyword = v + return s +} + +// SetLastObservedAt sets the LastObservedAt field's value. +func (s *AwsSecurityFindingFilters) SetLastObservedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.LastObservedAt = v + return s +} + +// SetMalwareName sets the MalwareName field's value. +func (s *AwsSecurityFindingFilters) SetMalwareName(v []*StringFilter) *AwsSecurityFindingFilters { + s.MalwareName = v + return s +} + +// SetMalwarePath sets the MalwarePath field's value. +func (s *AwsSecurityFindingFilters) SetMalwarePath(v []*StringFilter) *AwsSecurityFindingFilters { + s.MalwarePath = v + return s +} + +// SetMalwareState sets the MalwareState field's value. +func (s *AwsSecurityFindingFilters) SetMalwareState(v []*StringFilter) *AwsSecurityFindingFilters { + s.MalwareState = v + return s +} + +// SetMalwareType sets the MalwareType field's value. +func (s *AwsSecurityFindingFilters) SetMalwareType(v []*StringFilter) *AwsSecurityFindingFilters { + s.MalwareType = v + return s +} + +// SetNetworkDestinationDomain sets the NetworkDestinationDomain field's value. +func (s *AwsSecurityFindingFilters) SetNetworkDestinationDomain(v []*StringFilter) *AwsSecurityFindingFilters { + s.NetworkDestinationDomain = v + return s +} + +// SetNetworkDestinationIpV4 sets the NetworkDestinationIpV4 field's value. +func (s *AwsSecurityFindingFilters) SetNetworkDestinationIpV4(v []*IpFilter) *AwsSecurityFindingFilters { + s.NetworkDestinationIpV4 = v + return s +} + +// SetNetworkDestinationIpV6 sets the NetworkDestinationIpV6 field's value. +func (s *AwsSecurityFindingFilters) SetNetworkDestinationIpV6(v []*IpFilter) *AwsSecurityFindingFilters { + s.NetworkDestinationIpV6 = v + return s +} + +// SetNetworkDestinationPort sets the NetworkDestinationPort field's value. +func (s *AwsSecurityFindingFilters) SetNetworkDestinationPort(v []*NumberFilter) *AwsSecurityFindingFilters { + s.NetworkDestinationPort = v + return s +} + +// SetNetworkDirection sets the NetworkDirection field's value. +func (s *AwsSecurityFindingFilters) SetNetworkDirection(v []*StringFilter) *AwsSecurityFindingFilters { + s.NetworkDirection = v + return s +} + +// SetNetworkProtocol sets the NetworkProtocol field's value. +func (s *AwsSecurityFindingFilters) SetNetworkProtocol(v []*StringFilter) *AwsSecurityFindingFilters { + s.NetworkProtocol = v + return s +} + +// SetNetworkSourceDomain sets the NetworkSourceDomain field's value. +func (s *AwsSecurityFindingFilters) SetNetworkSourceDomain(v []*StringFilter) *AwsSecurityFindingFilters { + s.NetworkSourceDomain = v + return s +} + +// SetNetworkSourceIpV4 sets the NetworkSourceIpV4 field's value. +func (s *AwsSecurityFindingFilters) SetNetworkSourceIpV4(v []*IpFilter) *AwsSecurityFindingFilters { + s.NetworkSourceIpV4 = v + return s +} + +// SetNetworkSourceIpV6 sets the NetworkSourceIpV6 field's value. +func (s *AwsSecurityFindingFilters) SetNetworkSourceIpV6(v []*IpFilter) *AwsSecurityFindingFilters { + s.NetworkSourceIpV6 = v + return s +} + +// SetNetworkSourceMac sets the NetworkSourceMac field's value. +func (s *AwsSecurityFindingFilters) SetNetworkSourceMac(v []*StringFilter) *AwsSecurityFindingFilters { + s.NetworkSourceMac = v + return s +} + +// SetNetworkSourcePort sets the NetworkSourcePort field's value. +func (s *AwsSecurityFindingFilters) SetNetworkSourcePort(v []*NumberFilter) *AwsSecurityFindingFilters { + s.NetworkSourcePort = v + return s +} + +// SetNoteText sets the NoteText field's value. +func (s *AwsSecurityFindingFilters) SetNoteText(v []*StringFilter) *AwsSecurityFindingFilters { + s.NoteText = v + return s +} + +// SetNoteUpdatedAt sets the NoteUpdatedAt field's value. +func (s *AwsSecurityFindingFilters) SetNoteUpdatedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.NoteUpdatedAt = v + return s +} + +// SetNoteUpdatedBy sets the NoteUpdatedBy field's value. +func (s *AwsSecurityFindingFilters) SetNoteUpdatedBy(v []*StringFilter) *AwsSecurityFindingFilters { + s.NoteUpdatedBy = v + return s +} + +// SetProcessLaunchedAt sets the ProcessLaunchedAt field's value. +func (s *AwsSecurityFindingFilters) SetProcessLaunchedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.ProcessLaunchedAt = v + return s +} + +// SetProcessName sets the ProcessName field's value. +func (s *AwsSecurityFindingFilters) SetProcessName(v []*StringFilter) *AwsSecurityFindingFilters { + s.ProcessName = v + return s +} + +// SetProcessParentPid sets the ProcessParentPid field's value. +func (s *AwsSecurityFindingFilters) SetProcessParentPid(v []*NumberFilter) *AwsSecurityFindingFilters { + s.ProcessParentPid = v + return s +} + +// SetProcessPath sets the ProcessPath field's value. +func (s *AwsSecurityFindingFilters) SetProcessPath(v []*StringFilter) *AwsSecurityFindingFilters { + s.ProcessPath = v + return s +} + +// SetProcessPid sets the ProcessPid field's value. +func (s *AwsSecurityFindingFilters) SetProcessPid(v []*NumberFilter) *AwsSecurityFindingFilters { + s.ProcessPid = v + return s +} + +// SetProcessTerminatedAt sets the ProcessTerminatedAt field's value. +func (s *AwsSecurityFindingFilters) SetProcessTerminatedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.ProcessTerminatedAt = v + return s +} + +// SetProductArn sets the ProductArn field's value. +func (s *AwsSecurityFindingFilters) SetProductArn(v []*StringFilter) *AwsSecurityFindingFilters { + s.ProductArn = v + return s +} + +// SetProductFields sets the ProductFields field's value. +func (s *AwsSecurityFindingFilters) SetProductFields(v []*MapFilter) *AwsSecurityFindingFilters { + s.ProductFields = v + return s +} + +// SetProductName sets the ProductName field's value. +func (s *AwsSecurityFindingFilters) SetProductName(v []*StringFilter) *AwsSecurityFindingFilters { + s.ProductName = v + return s +} + +// SetRecommendationText sets the RecommendationText field's value. +func (s *AwsSecurityFindingFilters) SetRecommendationText(v []*StringFilter) *AwsSecurityFindingFilters { + s.RecommendationText = v + return s +} + +// SetRecordState sets the RecordState field's value. +func (s *AwsSecurityFindingFilters) SetRecordState(v []*StringFilter) *AwsSecurityFindingFilters { + s.RecordState = v + return s +} + +// SetRelatedFindingsId sets the RelatedFindingsId field's value. +func (s *AwsSecurityFindingFilters) SetRelatedFindingsId(v []*StringFilter) *AwsSecurityFindingFilters { + s.RelatedFindingsId = v + return s +} + +// SetRelatedFindingsProductArn sets the RelatedFindingsProductArn field's value. +func (s *AwsSecurityFindingFilters) SetRelatedFindingsProductArn(v []*StringFilter) *AwsSecurityFindingFilters { + s.RelatedFindingsProductArn = v + return s +} + +// SetResourceAwsEc2InstanceIamInstanceProfileArn sets the ResourceAwsEc2InstanceIamInstanceProfileArn field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceIamInstanceProfileArn(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceIamInstanceProfileArn = v + return s +} + +// SetResourceAwsEc2InstanceImageId sets the ResourceAwsEc2InstanceImageId field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceImageId(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceImageId = v + return s +} + +// SetResourceAwsEc2InstanceIpV4Addresses sets the ResourceAwsEc2InstanceIpV4Addresses field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceIpV4Addresses(v []*IpFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceIpV4Addresses = v + return s +} + +// SetResourceAwsEc2InstanceIpV6Addresses sets the ResourceAwsEc2InstanceIpV6Addresses field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceIpV6Addresses(v []*IpFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceIpV6Addresses = v + return s +} + +// SetResourceAwsEc2InstanceKeyName sets the ResourceAwsEc2InstanceKeyName field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceKeyName(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceKeyName = v + return s +} + +// SetResourceAwsEc2InstanceLaunchedAt sets the ResourceAwsEc2InstanceLaunchedAt field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceLaunchedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceLaunchedAt = v + return s +} + +// SetResourceAwsEc2InstanceSubnetId sets the ResourceAwsEc2InstanceSubnetId field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceSubnetId(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceSubnetId = v + return s +} + +// SetResourceAwsEc2InstanceType sets the ResourceAwsEc2InstanceType field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceType(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceType = v + return s +} + +// SetResourceAwsEc2InstanceVpcId sets the ResourceAwsEc2InstanceVpcId field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceVpcId(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsEc2InstanceVpcId = v + return s +} + +// SetResourceAwsIamAccessKeyCreatedAt sets the ResourceAwsIamAccessKeyCreatedAt field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsIamAccessKeyCreatedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.ResourceAwsIamAccessKeyCreatedAt = v + return s +} + +// SetResourceAwsIamAccessKeyStatus sets the ResourceAwsIamAccessKeyStatus field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsIamAccessKeyStatus(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsIamAccessKeyStatus = v + return s +} + +// SetResourceAwsIamAccessKeyUserName sets the ResourceAwsIamAccessKeyUserName field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsIamAccessKeyUserName(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsIamAccessKeyUserName = v + return s +} + +// SetResourceAwsS3BucketOwnerId sets the ResourceAwsS3BucketOwnerId field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsS3BucketOwnerId(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsS3BucketOwnerId = v + return s +} + +// SetResourceAwsS3BucketOwnerName sets the ResourceAwsS3BucketOwnerName field's value. +func (s *AwsSecurityFindingFilters) SetResourceAwsS3BucketOwnerName(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceAwsS3BucketOwnerName = v + return s +} + +// SetResourceContainerImageId sets the ResourceContainerImageId field's value. +func (s *AwsSecurityFindingFilters) SetResourceContainerImageId(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceContainerImageId = v + return s +} + +// SetResourceContainerImageName sets the ResourceContainerImageName field's value. +func (s *AwsSecurityFindingFilters) SetResourceContainerImageName(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceContainerImageName = v + return s +} + +// SetResourceContainerLaunchedAt sets the ResourceContainerLaunchedAt field's value. +func (s *AwsSecurityFindingFilters) SetResourceContainerLaunchedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.ResourceContainerLaunchedAt = v + return s +} + +// SetResourceContainerName sets the ResourceContainerName field's value. +func (s *AwsSecurityFindingFilters) SetResourceContainerName(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceContainerName = v + return s +} + +// SetResourceDetailsOther sets the ResourceDetailsOther field's value. +func (s *AwsSecurityFindingFilters) SetResourceDetailsOther(v []*MapFilter) *AwsSecurityFindingFilters { + s.ResourceDetailsOther = v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *AwsSecurityFindingFilters) SetResourceId(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceId = v + return s +} + +// SetResourcePartition sets the ResourcePartition field's value. +func (s *AwsSecurityFindingFilters) SetResourcePartition(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourcePartition = v + return s +} + +// SetResourceRegion sets the ResourceRegion field's value. +func (s *AwsSecurityFindingFilters) SetResourceRegion(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceRegion = v + return s +} + +// SetResourceTags sets the ResourceTags field's value. +func (s *AwsSecurityFindingFilters) SetResourceTags(v []*MapFilter) *AwsSecurityFindingFilters { + s.ResourceTags = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *AwsSecurityFindingFilters) SetResourceType(v []*StringFilter) *AwsSecurityFindingFilters { + s.ResourceType = v + return s +} + +// SetSeverityLabel sets the SeverityLabel field's value. +func (s *AwsSecurityFindingFilters) SetSeverityLabel(v []*StringFilter) *AwsSecurityFindingFilters { + s.SeverityLabel = v + return s +} + +// SetSeverityNormalized sets the SeverityNormalized field's value. +func (s *AwsSecurityFindingFilters) SetSeverityNormalized(v []*NumberFilter) *AwsSecurityFindingFilters { + s.SeverityNormalized = v + return s +} + +// SetSeverityProduct sets the SeverityProduct field's value. +func (s *AwsSecurityFindingFilters) SetSeverityProduct(v []*NumberFilter) *AwsSecurityFindingFilters { + s.SeverityProduct = v + return s +} + +// SetSourceUrl sets the SourceUrl field's value. +func (s *AwsSecurityFindingFilters) SetSourceUrl(v []*StringFilter) *AwsSecurityFindingFilters { + s.SourceUrl = v + return s +} + +// SetThreatIntelIndicatorCategory sets the ThreatIntelIndicatorCategory field's value. +func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorCategory(v []*StringFilter) *AwsSecurityFindingFilters { + s.ThreatIntelIndicatorCategory = v + return s +} + +// SetThreatIntelIndicatorLastObservedAt sets the ThreatIntelIndicatorLastObservedAt field's value. +func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorLastObservedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.ThreatIntelIndicatorLastObservedAt = v + return s +} + +// SetThreatIntelIndicatorSource sets the ThreatIntelIndicatorSource field's value. +func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorSource(v []*StringFilter) *AwsSecurityFindingFilters { + s.ThreatIntelIndicatorSource = v + return s +} + +// SetThreatIntelIndicatorSourceUrl sets the ThreatIntelIndicatorSourceUrl field's value. +func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorSourceUrl(v []*StringFilter) *AwsSecurityFindingFilters { + s.ThreatIntelIndicatorSourceUrl = v + return s +} + +// SetThreatIntelIndicatorType sets the ThreatIntelIndicatorType field's value. +func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorType(v []*StringFilter) *AwsSecurityFindingFilters { + s.ThreatIntelIndicatorType = v + return s +} + +// SetThreatIntelIndicatorValue sets the ThreatIntelIndicatorValue field's value. +func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorValue(v []*StringFilter) *AwsSecurityFindingFilters { + s.ThreatIntelIndicatorValue = v + return s +} + +// SetTitle sets the Title field's value. +func (s *AwsSecurityFindingFilters) SetTitle(v []*StringFilter) *AwsSecurityFindingFilters { + s.Title = v + return s +} + +// SetType sets the Type field's value. +func (s *AwsSecurityFindingFilters) SetType(v []*StringFilter) *AwsSecurityFindingFilters { + s.Type = v + return s +} + +// SetUpdatedAt sets the UpdatedAt field's value. +func (s *AwsSecurityFindingFilters) SetUpdatedAt(v []*DateFilter) *AwsSecurityFindingFilters { + s.UpdatedAt = v + return s +} + +// SetUserDefinedFields sets the UserDefinedFields field's value. +func (s *AwsSecurityFindingFilters) SetUserDefinedFields(v []*MapFilter) *AwsSecurityFindingFilters { + s.UserDefinedFields = v + return s +} + +// SetVerificationState sets the VerificationState field's value. +func (s *AwsSecurityFindingFilters) SetVerificationState(v []*StringFilter) *AwsSecurityFindingFilters { + s.VerificationState = v + return s +} + +// SetWorkflowState sets the WorkflowState field's value. +func (s *AwsSecurityFindingFilters) SetWorkflowState(v []*StringFilter) *AwsSecurityFindingFilters { + s.WorkflowState = v + return s +} + +type BatchDisableStandardsInput struct { + _ struct{} `type:"structure"` + + // The ARNS of the standards subscriptions that you want to disable. + // + // StandardsSubscriptionArns is a required field + StandardsSubscriptionArns []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchDisableStandardsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchDisableStandardsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchDisableStandardsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchDisableStandardsInput"} + if s.StandardsSubscriptionArns == nil { + invalidParams.Add(request.NewErrParamRequired("StandardsSubscriptionArns")) + } + if s.StandardsSubscriptionArns != nil && len(s.StandardsSubscriptionArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StandardsSubscriptionArns", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStandardsSubscriptionArns sets the StandardsSubscriptionArns field's value. +func (s *BatchDisableStandardsInput) SetStandardsSubscriptionArns(v []*string) *BatchDisableStandardsInput { + s.StandardsSubscriptionArns = v + return s +} + +type BatchDisableStandardsOutput struct { + _ struct{} `type:"structure"` + + // The details of the standards subscriptions that were disabled. + StandardsSubscriptions []*StandardsSubscription `type:"list"` +} + +// String returns the string representation +func (s BatchDisableStandardsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchDisableStandardsOutput) GoString() string { + return s.String() +} + +// SetStandardsSubscriptions sets the StandardsSubscriptions field's value. +func (s *BatchDisableStandardsOutput) SetStandardsSubscriptions(v []*StandardsSubscription) *BatchDisableStandardsOutput { + s.StandardsSubscriptions = v + return s +} + +type BatchEnableStandardsInput struct { + _ struct{} `type:"structure"` + + // The list of standards that you want to enable. + // + // StandardsSubscriptionRequests is a required field + StandardsSubscriptionRequests []*StandardsSubscriptionRequest `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchEnableStandardsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchEnableStandardsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchEnableStandardsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchEnableStandardsInput"} + if s.StandardsSubscriptionRequests == nil { + invalidParams.Add(request.NewErrParamRequired("StandardsSubscriptionRequests")) + } + if s.StandardsSubscriptionRequests != nil && len(s.StandardsSubscriptionRequests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StandardsSubscriptionRequests", 1)) + } + if s.StandardsSubscriptionRequests != nil { + for i, v := range s.StandardsSubscriptionRequests { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StandardsSubscriptionRequests", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStandardsSubscriptionRequests sets the StandardsSubscriptionRequests field's value. +func (s *BatchEnableStandardsInput) SetStandardsSubscriptionRequests(v []*StandardsSubscriptionRequest) *BatchEnableStandardsInput { + s.StandardsSubscriptionRequests = v + return s +} + +type BatchEnableStandardsOutput struct { + _ struct{} `type:"structure"` + + // The details of the standards subscriptions that were enabled. + StandardsSubscriptions []*StandardsSubscription `type:"list"` +} + +// String returns the string representation +func (s BatchEnableStandardsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchEnableStandardsOutput) GoString() string { + return s.String() +} + +// SetStandardsSubscriptions sets the StandardsSubscriptions field's value. +func (s *BatchEnableStandardsOutput) SetStandardsSubscriptions(v []*StandardsSubscription) *BatchEnableStandardsOutput { + s.StandardsSubscriptions = v + return s +} + +type BatchImportFindingsInput struct { + _ struct{} `type:"structure"` + + // A list of findings that you want to import. Must be submitted in the AWSSecurityFinding + // format. + // + // Findings is a required field + Findings []*AwsSecurityFinding `type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchImportFindingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchImportFindingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchImportFindingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchImportFindingsInput"} + if s.Findings == nil { + invalidParams.Add(request.NewErrParamRequired("Findings")) + } + if s.Findings != nil { + for i, v := range s.Findings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Findings", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFindings sets the Findings field's value. +func (s *BatchImportFindingsInput) SetFindings(v []*AwsSecurityFinding) *BatchImportFindingsInput { + s.Findings = v + return s +} + +type BatchImportFindingsOutput struct { + _ struct{} `type:"structure"` + + // The number of findings that cannot be imported. + // + // FailedCount is a required field + FailedCount *int64 `type:"integer" required:"true"` + + // The list of the findings that cannot be imported. + FailedFindings []*ImportFindingsError `type:"list"` + + // The number of findings that were successfully imported + // + // SuccessCount is a required field + SuccessCount *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s BatchImportFindingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchImportFindingsOutput) GoString() string { + return s.String() +} + +// SetFailedCount sets the FailedCount field's value. +func (s *BatchImportFindingsOutput) SetFailedCount(v int64) *BatchImportFindingsOutput { + s.FailedCount = &v + return s +} + +// SetFailedFindings sets the FailedFindings field's value. +func (s *BatchImportFindingsOutput) SetFailedFindings(v []*ImportFindingsError) *BatchImportFindingsOutput { + s.FailedFindings = v + return s +} + +// SetSuccessCount sets the SuccessCount field's value. +func (s *BatchImportFindingsOutput) SetSuccessCount(v int64) *BatchImportFindingsOutput { + s.SuccessCount = &v + return s +} + +// Exclusive to findings that are generated as the result of a check run against +// a specific rule in a supported standard (for example, AWS CIS Foundations). +// Contains compliance-related finding details. +type Compliance struct { + _ struct{} `type:"structure"` + + // Indicates the result of a compliance check. + Status *string `type:"string" enum:"ComplianceStatus"` +} + +// String returns the string representation +func (s Compliance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Compliance) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *Compliance) SetStatus(v string) *Compliance { + s.Status = &v + return s +} + +// Container details related to a finding. +type ContainerDetails struct { + _ struct{} `type:"structure"` + + // The identifier of the image related to a finding. + ImageId *string `type:"string"` + + // The name of the image related to a finding. + ImageName *string `type:"string"` + + // The date/time that the container was started. + LaunchedAt *string `type:"string"` + + // The name of the container related to a finding. + Name *string `type:"string"` +} + +// String returns the string representation +func (s ContainerDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContainerDetails) GoString() string { + return s.String() +} + +// SetImageId sets the ImageId field's value. +func (s *ContainerDetails) SetImageId(v string) *ContainerDetails { + s.ImageId = &v + return s +} + +// SetImageName sets the ImageName field's value. +func (s *ContainerDetails) SetImageName(v string) *ContainerDetails { + s.ImageName = &v + return s +} + +// SetLaunchedAt sets the LaunchedAt field's value. +func (s *ContainerDetails) SetLaunchedAt(v string) *ContainerDetails { + s.LaunchedAt = &v + return s +} + +// SetName sets the Name field's value. +func (s *ContainerDetails) SetName(v string) *ContainerDetails { + s.Name = &v + return s +} + +type CreateInsightInput struct { + _ struct{} `type:"structure"` + + // A collection of attributes that are applied to all active Security Hub-aggregated + // findings and that result in a subset of findings that are included in this + // insight. + // + // Filters is a required field + Filters *AwsSecurityFindingFilters `type:"structure" required:"true"` + + // The attribute by which the insight's findings are grouped. This attribute + // is used as a findings aggregator for the purposes of viewing and managing + // multiple related findings under a single operand. + // + // GroupByAttribute is a required field + GroupByAttribute *string `type:"string" required:"true"` + + // The user-defined name that identifies the insight that you want to create. + // + // Name is a required field + Name *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateInsightInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInsightInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInsightInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInsightInput"} + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + if s.GroupByAttribute == nil { + invalidParams.Add(request.NewErrParamRequired("GroupByAttribute")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *CreateInsightInput) SetFilters(v *AwsSecurityFindingFilters) *CreateInsightInput { + s.Filters = v + return s +} + +// SetGroupByAttribute sets the GroupByAttribute field's value. +func (s *CreateInsightInput) SetGroupByAttribute(v string) *CreateInsightInput { + s.GroupByAttribute = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateInsightInput) SetName(v string) *CreateInsightInput { + s.Name = &v + return s +} + +type CreateInsightOutput struct { + _ struct{} `type:"structure"` + + // The ARN Of the created insight. + // + // InsightArn is a required field + InsightArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateInsightOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInsightOutput) GoString() string { + return s.String() +} + +// SetInsightArn sets the InsightArn field's value. +func (s *CreateInsightOutput) SetInsightArn(v string) *CreateInsightOutput { + s.InsightArn = &v + return s +} + +type CreateMembersInput struct { + _ struct{} `type:"structure"` + + // A list of account ID and email address pairs of the accounts that you want + // to associate with the master Security Hub account. + AccountDetails []*AccountDetails `type:"list"` +} + +// String returns the string representation +func (s CreateMembersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateMembersInput) GoString() string { + return s.String() +} + +// SetAccountDetails sets the AccountDetails field's value. +func (s *CreateMembersInput) SetAccountDetails(v []*AccountDetails) *CreateMembersInput { + s.AccountDetails = v + return s +} + +type CreateMembersOutput struct { + _ struct{} `type:"structure"` + + // A list of account ID and email address pairs of the AWS accounts that could + // not be processed. + UnprocessedAccounts []*Result `type:"list"` +} + +// String returns the string representation +func (s CreateMembersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateMembersOutput) GoString() string { + return s.String() +} + +// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. +func (s *CreateMembersOutput) SetUnprocessedAccounts(v []*Result) *CreateMembersOutput { + s.UnprocessedAccounts = v + return s +} + +// A date filter for querying findings. +type DateFilter struct { + _ struct{} `type:"structure"` + + // A date range for the date filter. + DateRange *DateRange `type:"structure"` + + // An end date for the date filter. + End *string `type:"string"` + + // A start date for the date filter. + Start *string `type:"string"` +} + +// String returns the string representation +func (s DateFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DateFilter) GoString() string { + return s.String() +} + +// SetDateRange sets the DateRange field's value. +func (s *DateFilter) SetDateRange(v *DateRange) *DateFilter { + s.DateRange = v + return s +} + +// SetEnd sets the End field's value. +func (s *DateFilter) SetEnd(v string) *DateFilter { + s.End = &v + return s +} + +// SetStart sets the Start field's value. +func (s *DateFilter) SetStart(v string) *DateFilter { + s.Start = &v + return s +} + +// A date range for the date filter. +type DateRange struct { + _ struct{} `type:"structure"` + + // A date range unit for the date filter. + Unit *string `type:"string" enum:"DateRangeUnit"` + + // A date range value for the date filter. + Value *int64 `type:"integer"` +} + +// String returns the string representation +func (s DateRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DateRange) GoString() string { + return s.String() +} + +// SetUnit sets the Unit field's value. +func (s *DateRange) SetUnit(v string) *DateRange { + s.Unit = &v + return s +} + +// SetValue sets the Value field's value. +func (s *DateRange) SetValue(v int64) *DateRange { + s.Value = &v + return s +} + +type DeclineInvitationsInput struct { + _ struct{} `type:"structure"` + + // A list of account IDs specifying accounts whose invitations to Security Hub + // you want to decline. + AccountIds []*string `type:"list"` +} + +// String returns the string representation +func (s DeclineInvitationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeclineInvitationsInput) GoString() string { + return s.String() +} + +// SetAccountIds sets the AccountIds field's value. +func (s *DeclineInvitationsInput) SetAccountIds(v []*string) *DeclineInvitationsInput { + s.AccountIds = v + return s +} + +type DeclineInvitationsOutput struct { + _ struct{} `type:"structure"` + + // A list of account ID and email address pairs of the AWS accounts that could + // not be processed. + UnprocessedAccounts []*Result `type:"list"` +} + +// String returns the string representation +func (s DeclineInvitationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeclineInvitationsOutput) GoString() string { + return s.String() +} + +// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. +func (s *DeclineInvitationsOutput) SetUnprocessedAccounts(v []*Result) *DeclineInvitationsOutput { + s.UnprocessedAccounts = v + return s +} + +type DeleteInsightInput struct { + _ struct{} `type:"structure"` + + // The ARN of the insight that you want to delete. + // + // InsightArn is a required field + InsightArn *string `location:"uri" locationName:"InsightArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInsightInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInsightInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInsightInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInsightInput"} + if s.InsightArn == nil { + invalidParams.Add(request.NewErrParamRequired("InsightArn")) + } + if s.InsightArn != nil && len(*s.InsightArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InsightArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInsightArn sets the InsightArn field's value. +func (s *DeleteInsightInput) SetInsightArn(v string) *DeleteInsightInput { + s.InsightArn = &v + return s +} + +type DeleteInsightOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the insight that was deleted. + // + // InsightArn is a required field + InsightArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInsightOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInsightOutput) GoString() string { + return s.String() +} + +// SetInsightArn sets the InsightArn field's value. +func (s *DeleteInsightOutput) SetInsightArn(v string) *DeleteInsightOutput { + s.InsightArn = &v + return s +} + +type DeleteInvitationsInput struct { + _ struct{} `type:"structure"` + + // A list of account IDs specifying accounts whose invitations to Security Hub + // you want to delete. + AccountIds []*string `type:"list"` +} + +// String returns the string representation +func (s DeleteInvitationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInvitationsInput) GoString() string { + return s.String() +} + +// SetAccountIds sets the AccountIds field's value. +func (s *DeleteInvitationsInput) SetAccountIds(v []*string) *DeleteInvitationsInput { + s.AccountIds = v + return s +} + +type DeleteInvitationsOutput struct { + _ struct{} `type:"structure"` + + // A list of account ID and email address pairs of the AWS accounts that could + // not be processed. + UnprocessedAccounts []*Result `type:"list"` +} + +// String returns the string representation +func (s DeleteInvitationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInvitationsOutput) GoString() string { + return s.String() +} + +// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. +func (s *DeleteInvitationsOutput) SetUnprocessedAccounts(v []*Result) *DeleteInvitationsOutput { + s.UnprocessedAccounts = v + return s +} + +type DeleteMembersInput struct { + _ struct{} `type:"structure"` + + // A list of account IDs of the Security Hub member accounts that you want to + // delete. + AccountIds []*string `type:"list"` +} + +// String returns the string representation +func (s DeleteMembersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteMembersInput) GoString() string { + return s.String() +} + +// SetAccountIds sets the AccountIds field's value. +func (s *DeleteMembersInput) SetAccountIds(v []*string) *DeleteMembersInput { + s.AccountIds = v + return s +} + +type DeleteMembersOutput struct { + _ struct{} `type:"structure"` + + // A list of account ID and email address pairs of the AWS accounts that could + // not be processed. + UnprocessedAccounts []*Result `type:"list"` +} + +// String returns the string representation +func (s DeleteMembersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteMembersOutput) GoString() string { + return s.String() +} + +// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. +func (s *DeleteMembersOutput) SetUnprocessedAccounts(v []*Result) *DeleteMembersOutput { + s.UnprocessedAccounts = v + return s +} + +type DisableImportFindingsForProductInput struct { + _ struct{} `type:"structure"` + + // The ARN of a resource that represents your subscription to a supported product. + // + // ProductSubscriptionArn is a required field + ProductSubscriptionArn *string `location:"uri" locationName:"ProductSubscriptionArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableImportFindingsForProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableImportFindingsForProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableImportFindingsForProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableImportFindingsForProductInput"} + if s.ProductSubscriptionArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProductSubscriptionArn")) + } + if s.ProductSubscriptionArn != nil && len(*s.ProductSubscriptionArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductSubscriptionArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProductSubscriptionArn sets the ProductSubscriptionArn field's value. +func (s *DisableImportFindingsForProductInput) SetProductSubscriptionArn(v string) *DisableImportFindingsForProductInput { + s.ProductSubscriptionArn = &v + return s +} + +type DisableImportFindingsForProductOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableImportFindingsForProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableImportFindingsForProductOutput) GoString() string { + return s.String() +} + +type DisableSecurityHubInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableSecurityHubInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableSecurityHubInput) GoString() string { + return s.String() +} + +type DisableSecurityHubOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableSecurityHubOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableSecurityHubOutput) GoString() string { + return s.String() +} + +type DisassociateFromMasterAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateFromMasterAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateFromMasterAccountInput) GoString() string { + return s.String() +} + +type DisassociateFromMasterAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateFromMasterAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateFromMasterAccountOutput) GoString() string { + return s.String() +} + +type DisassociateMembersInput struct { + _ struct{} `type:"structure"` + + // The account IDs of the member accounts that you want to disassociate from + // the master account. + AccountIds []*string `type:"list"` +} + +// String returns the string representation +func (s DisassociateMembersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateMembersInput) GoString() string { + return s.String() +} + +// SetAccountIds sets the AccountIds field's value. +func (s *DisassociateMembersInput) SetAccountIds(v []*string) *DisassociateMembersInput { + s.AccountIds = v + return s +} + +type DisassociateMembersOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateMembersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateMembersOutput) GoString() string { + return s.String() +} + +type EnableImportFindingsForProductInput struct { + _ struct{} `type:"structure"` + + // The ARN of the product that generates findings that you want to import into + // Security Hub. + // + // ProductArn is a required field + ProductArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s EnableImportFindingsForProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableImportFindingsForProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableImportFindingsForProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableImportFindingsForProductInput"} + if s.ProductArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProductArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProductArn sets the ProductArn field's value. +func (s *EnableImportFindingsForProductInput) SetProductArn(v string) *EnableImportFindingsForProductInput { + s.ProductArn = &v + return s +} + +type EnableImportFindingsForProductOutput struct { + _ struct{} `type:"structure"` + + // The ARN of a resource that represents your subscription to the product that + // generates the findings that you want to import into Security Hub. + ProductSubscriptionArn *string `type:"string"` +} + +// String returns the string representation +func (s EnableImportFindingsForProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableImportFindingsForProductOutput) GoString() string { + return s.String() +} + +// SetProductSubscriptionArn sets the ProductSubscriptionArn field's value. +func (s *EnableImportFindingsForProductOutput) SetProductSubscriptionArn(v string) *EnableImportFindingsForProductOutput { + s.ProductSubscriptionArn = &v + return s +} + +type EnableSecurityHubInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableSecurityHubInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableSecurityHubInput) GoString() string { + return s.String() +} + +type EnableSecurityHubOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableSecurityHubOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableSecurityHubOutput) GoString() string { + return s.String() +} + +type GetEnabledStandardsInput struct { + _ struct{} `type:"structure"` + + // Indicates the maximum number of items that you want in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // Paginates results. Set the value of this parameter to NULL on your first + // call to the GetEnabledStandards operation. For subsequent calls to the operation, + // fill nextToken in the request with the value of nextToken from the previous + // response to continue listing data. + NextToken *string `type:"string"` + + // The list of standards subscription ARNS that you want to list and describe. + StandardsSubscriptionArns []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s GetEnabledStandardsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEnabledStandardsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEnabledStandardsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEnabledStandardsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.StandardsSubscriptionArns != nil && len(s.StandardsSubscriptionArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StandardsSubscriptionArns", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetEnabledStandardsInput) SetMaxResults(v int64) *GetEnabledStandardsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetEnabledStandardsInput) SetNextToken(v string) *GetEnabledStandardsInput { + s.NextToken = &v + return s +} + +// SetStandardsSubscriptionArns sets the StandardsSubscriptionArns field's value. +func (s *GetEnabledStandardsInput) SetStandardsSubscriptionArns(v []*string) *GetEnabledStandardsInput { + s.StandardsSubscriptionArns = v + return s +} + +type GetEnabledStandardsOutput struct { + _ struct{} `type:"structure"` + + // The token that is required for pagination. + NextToken *string `type:"string"` + + // The standards subscription details returned by the operation. + StandardsSubscriptions []*StandardsSubscription `type:"list"` +} + +// String returns the string representation +func (s GetEnabledStandardsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEnabledStandardsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetEnabledStandardsOutput) SetNextToken(v string) *GetEnabledStandardsOutput { + s.NextToken = &v + return s +} + +// SetStandardsSubscriptions sets the StandardsSubscriptions field's value. +func (s *GetEnabledStandardsOutput) SetStandardsSubscriptions(v []*StandardsSubscription) *GetEnabledStandardsOutput { + s.StandardsSubscriptions = v + return s +} + +type GetFindingsInput struct { + _ struct{} `type:"structure"` + + // A collection of attributes that is use for querying findings. + Filters *AwsSecurityFindingFilters `type:"structure"` + + // Indicates the maximum number of items that you want in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // Paginates results. Set the value of this parameter to NULL on your first + // call to the GetFindings operation. For subsequent calls to the operation, + // fill nextToken in the request with the value of nextToken from the previous + // response to continue listing data. + NextToken *string `type:"string"` + + // A collection of attributes used for sorting findings. + SortCriteria []*SortCriterion `type:"list"` +} + +// String returns the string representation +func (s GetFindingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFindingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFindingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFindingsInput"} + 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 *GetFindingsInput) SetFilters(v *AwsSecurityFindingFilters) *GetFindingsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetFindingsInput) SetMaxResults(v int64) *GetFindingsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetFindingsInput) SetNextToken(v string) *GetFindingsInput { + s.NextToken = &v + return s +} + +// SetSortCriteria sets the SortCriteria field's value. +func (s *GetFindingsInput) SetSortCriteria(v []*SortCriterion) *GetFindingsInput { + s.SortCriteria = v + return s +} + +type GetFindingsOutput struct { + _ struct{} `type:"structure"` + + // Findings details returned by the operation. + // + // Findings is a required field + Findings []*AwsSecurityFinding `type:"list" required:"true"` + + // The token that is required for pagination. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetFindingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFindingsOutput) GoString() string { + return s.String() +} + +// SetFindings sets the Findings field's value. +func (s *GetFindingsOutput) SetFindings(v []*AwsSecurityFinding) *GetFindingsOutput { + s.Findings = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetFindingsOutput) SetNextToken(v string) *GetFindingsOutput { + s.NextToken = &v + return s +} + +type GetInsightResultsInput struct { + _ struct{} `type:"structure"` + + // The ARN of the insight whose results you want to see. + // + // InsightArn is a required field + InsightArn *string `location:"uri" locationName:"InsightArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetInsightResultsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInsightResultsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetInsightResultsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInsightResultsInput"} + if s.InsightArn == nil { + invalidParams.Add(request.NewErrParamRequired("InsightArn")) + } + if s.InsightArn != nil && len(*s.InsightArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InsightArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInsightArn sets the InsightArn field's value. +func (s *GetInsightResultsInput) SetInsightArn(v string) *GetInsightResultsInput { + s.InsightArn = &v + return s +} + +type GetInsightResultsOutput struct { + _ struct{} `type:"structure"` + + // The insight results returned by the operation. + // + // InsightResults is a required field + InsightResults *InsightResults `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetInsightResultsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInsightResultsOutput) GoString() string { + return s.String() +} + +// SetInsightResults sets the InsightResults field's value. +func (s *GetInsightResultsOutput) SetInsightResults(v *InsightResults) *GetInsightResultsOutput { + s.InsightResults = v + return s +} + +type GetInsightsInput struct { + _ struct{} `type:"structure"` + + // The ARNS of the insights that you want to describe. + InsightArns []*string `type:"list"` + + // Indicates the maximum number of items that you want in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // Paginates results. Set the value of this parameter to NULL on your first + // call to the GetInsights operation. For subsequent calls to the operation, + // fill nextToken in the request with the value of nextToken from the previous + // response to continue listing data. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetInsightsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInsightsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetInsightsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInsightsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInsightArns sets the InsightArns field's value. +func (s *GetInsightsInput) SetInsightArns(v []*string) *GetInsightsInput { + s.InsightArns = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetInsightsInput) SetMaxResults(v int64) *GetInsightsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetInsightsInput) SetNextToken(v string) *GetInsightsInput { + s.NextToken = &v + return s +} + +type GetInsightsOutput struct { + _ struct{} `type:"structure"` + + // The insights returned by the operation. + // + // Insights is a required field + Insights []*Insight `type:"list" required:"true"` + + // The token that is required for pagination. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetInsightsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInsightsOutput) GoString() string { + return s.String() +} + +// SetInsights sets the Insights field's value. +func (s *GetInsightsOutput) SetInsights(v []*Insight) *GetInsightsOutput { + s.Insights = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetInsightsOutput) SetNextToken(v string) *GetInsightsOutput { + s.NextToken = &v + return s +} + +type GetInvitationsCountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetInvitationsCountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInvitationsCountInput) GoString() string { + return s.String() +} + +type GetInvitationsCountOutput struct { + _ struct{} `type:"structure"` + + // The number of all membership invitations sent to this Security Hub member + // account, not including the currently accepted invitation. + InvitationsCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s GetInvitationsCountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInvitationsCountOutput) GoString() string { + return s.String() +} + +// SetInvitationsCount sets the InvitationsCount field's value. +func (s *GetInvitationsCountOutput) SetInvitationsCount(v int64) *GetInvitationsCountOutput { + s.InvitationsCount = &v + return s +} + +type GetMasterAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetMasterAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMasterAccountInput) GoString() string { + return s.String() +} + +type GetMasterAccountOutput struct { + _ struct{} `type:"structure"` + + // A list of details about the Security Hub master account for the current member + // account. + Master *Invitation `type:"structure"` +} + +// String returns the string representation +func (s GetMasterAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMasterAccountOutput) GoString() string { + return s.String() +} + +// SetMaster sets the Master field's value. +func (s *GetMasterAccountOutput) SetMaster(v *Invitation) *GetMasterAccountOutput { + s.Master = v + return s +} + +type GetMembersInput struct { + _ struct{} `type:"structure"` + + // A list of account IDs for the Security Hub member accounts on which you want + // to return the details. + // + // AccountIds is a required field + AccountIds []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s GetMembersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMembersInput) GoString() string { + return s.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 invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountIds sets the AccountIds field's value. +func (s *GetMembersInput) SetAccountIds(v []*string) *GetMembersInput { + s.AccountIds = v + return s +} + +type GetMembersOutput struct { + _ struct{} `type:"structure"` + + // A list of details about the Security Hub member accounts. + Members []*Member `type:"list"` + + // A list of account ID and email address pairs of the AWS accounts that could + // not be processed. + UnprocessedAccounts []*Result `type:"list"` +} + +// String returns the string representation +func (s GetMembersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMembersOutput) GoString() string { + return s.String() +} + +// SetMembers sets the Members field's value. +func (s *GetMembersOutput) SetMembers(v []*Member) *GetMembersOutput { + s.Members = v + return s +} + +// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. +func (s *GetMembersOutput) SetUnprocessedAccounts(v []*Result) *GetMembersOutput { + s.UnprocessedAccounts = v + return s +} + +// Includes details of the list of the findings that cannot be imported. +type ImportFindingsError struct { + _ struct{} `type:"structure"` + + // The code of the error made during the BatchImportFindings operation. + // + // ErrorCode is a required field + ErrorCode *string `type:"string" required:"true"` + + // The message of the error made during the BatchImportFindings operation. + // + // ErrorMessage is a required field + ErrorMessage *string `type:"string" required:"true"` + + // The id of the error made during the BatchImportFindings operation. + // + // Id is a required field + Id *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ImportFindingsError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportFindingsError) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *ImportFindingsError) SetErrorCode(v string) *ImportFindingsError { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *ImportFindingsError) SetErrorMessage(v string) *ImportFindingsError { + s.ErrorMessage = &v + return s +} + +// SetId sets the Id field's value. +func (s *ImportFindingsError) SetId(v string) *ImportFindingsError { + s.Id = &v + return s +} + +// Contains information about a Security Hub insight. +type Insight struct { + _ struct{} `type:"structure"` + + // A collection of attributes that are applied to all active Security Hub-aggregated + // findings and that result in a subset of findings that are included in this + // insight. + // + // Filters is a required field + Filters *AwsSecurityFindingFilters `type:"structure" required:"true"` + + // The attribute by which the insight's findings are grouped. This attribute + // is used as a findings aggregator for the purposes of viewing and managing + // multiple related findings under a single operand. + // + // GroupByAttribute is a required field + GroupByAttribute *string `type:"string" required:"true"` + + // The ARN of a Security Hub insight. + // + // InsightArn is a required field + InsightArn *string `type:"string" required:"true"` + + // The name of a Security Hub insight. + // + // Name is a required field + Name *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Insight) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Insight) GoString() string { + return s.String() +} + +// SetFilters sets the Filters field's value. +func (s *Insight) SetFilters(v *AwsSecurityFindingFilters) *Insight { + s.Filters = v + return s +} + +// SetGroupByAttribute sets the GroupByAttribute field's value. +func (s *Insight) SetGroupByAttribute(v string) *Insight { + s.GroupByAttribute = &v + return s +} + +// SetInsightArn sets the InsightArn field's value. +func (s *Insight) SetInsightArn(v string) *Insight { + s.InsightArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *Insight) SetName(v string) *Insight { + s.Name = &v + return s +} + +// The insight result values returned by the GetInsightResults operation. +type InsightResultValue struct { + _ struct{} `type:"structure"` + + // The number of findings returned for each GroupByAttributeValue. + // + // Count is a required field + Count *int64 `type:"integer" required:"true"` + + // The value of the attribute by which the findings are grouped for the insight's + // whose results are returned by the GetInsightResults operation. + // + // GroupByAttributeValue is a required field + GroupByAttributeValue *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s InsightResultValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InsightResultValue) GoString() string { + return s.String() +} + +// SetCount sets the Count field's value. +func (s *InsightResultValue) SetCount(v int64) *InsightResultValue { + s.Count = &v + return s +} + +// SetGroupByAttributeValue sets the GroupByAttributeValue field's value. +func (s *InsightResultValue) SetGroupByAttributeValue(v string) *InsightResultValue { + s.GroupByAttributeValue = &v + return s +} + +// The insight results returned by the GetInsightResults operation. +type InsightResults struct { + _ struct{} `type:"structure"` + + // The attribute by which the findings are grouped for the insight's whose results + // are returned by the GetInsightResults operation. + // + // GroupByAttribute is a required field + GroupByAttribute *string `type:"string" required:"true"` + + // The ARN of the insight whose results are returned by the GetInsightResults + // operation. + // + // InsightArn is a required field + InsightArn *string `type:"string" required:"true"` + + // The list of insight result values returned by the GetInsightResults operation. + // + // ResultValues is a required field + ResultValues []*InsightResultValue `type:"list" required:"true"` +} + +// String returns the string representation +func (s InsightResults) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InsightResults) GoString() string { + return s.String() +} + +// SetGroupByAttribute sets the GroupByAttribute field's value. +func (s *InsightResults) SetGroupByAttribute(v string) *InsightResults { + s.GroupByAttribute = &v + return s +} + +// SetInsightArn sets the InsightArn field's value. +func (s *InsightResults) SetInsightArn(v string) *InsightResults { + s.InsightArn = &v + return s +} + +// SetResultValues sets the ResultValues field's value. +func (s *InsightResults) SetResultValues(v []*InsightResultValue) *InsightResults { + s.ResultValues = v + return s +} + +// The details of an invitation sent to an AWS account by the Security Hub master +// account. +type Invitation struct { + _ struct{} `type:"structure"` + + // The account ID of the master Security Hub account who sent the invitation. + AccountId *string `type:"string"` + + // The ID of the invitation sent by the master Security Hub account. + InvitationId *string `type:"string"` + + // The timestamp of when the invitation was sent. + InvitedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The current relationship status between the inviter and invitee accounts. + MemberStatus *string `type:"string"` +} + +// String returns the string representation +func (s Invitation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Invitation) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *Invitation) SetAccountId(v string) *Invitation { + s.AccountId = &v + return s +} + +// SetInvitationId sets the InvitationId field's value. +func (s *Invitation) SetInvitationId(v string) *Invitation { + s.InvitationId = &v + return s +} + +// SetInvitedAt sets the InvitedAt field's value. +func (s *Invitation) SetInvitedAt(v time.Time) *Invitation { + s.InvitedAt = &v + return s +} + +// SetMemberStatus sets the MemberStatus field's value. +func (s *Invitation) SetMemberStatus(v string) *Invitation { + s.MemberStatus = &v + return s +} + +type InviteMembersInput struct { + _ struct{} `type:"structure"` + + // A list of IDs of the AWS accounts that you want to invite to Security Hub + // as members. + AccountIds []*string `type:"list"` +} + +// String returns the string representation +func (s InviteMembersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InviteMembersInput) GoString() string { + return s.String() +} + +// SetAccountIds sets the AccountIds field's value. +func (s *InviteMembersInput) SetAccountIds(v []*string) *InviteMembersInput { + s.AccountIds = v + return s +} + +type InviteMembersOutput struct { + _ struct{} `type:"structure"` + + // A list of account ID and email address pairs of the AWS accounts that could + // not be processed. + UnprocessedAccounts []*Result `type:"list"` +} + +// String returns the string representation +func (s InviteMembersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InviteMembersOutput) GoString() string { + return s.String() +} + +// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. +func (s *InviteMembersOutput) SetUnprocessedAccounts(v []*Result) *InviteMembersOutput { + s.UnprocessedAccounts = v + return s +} + +// The IP filter for querying findings.> +type IpFilter struct { + _ struct{} `type:"structure"` + + // Finding's CIDR value. + Cidr *string `type:"string"` +} + +// String returns the string representation +func (s IpFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpFilter) GoString() string { + return s.String() +} + +// SetCidr sets the Cidr field's value. +func (s *IpFilter) SetCidr(v string) *IpFilter { + s.Cidr = &v + return s +} + +// A keyword filter for querying findings. +type KeywordFilter struct { + _ struct{} `type:"structure"` + + // A value for the keyword. + Value *string `type:"string"` +} + +// String returns the string representation +func (s KeywordFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KeywordFilter) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *KeywordFilter) SetValue(v string) *KeywordFilter { + s.Value = &v + return s +} + +type ListEnabledProductsForImportInput struct { + _ struct{} `type:"structure"` + + // Indicates the maximum number of items that you want in the response. + MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` + + // Paginates results. Set the value of this parameter to NULL on your first + // call to the ListEnabledProductsForImport operation. For subsequent calls + // to the operation, fill nextToken in the request with the value of NextToken + // from the previous response to continue listing data. + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListEnabledProductsForImportInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEnabledProductsForImportInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEnabledProductsForImportInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEnabledProductsForImportInput"} + 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 *ListEnabledProductsForImportInput) SetMaxResults(v int64) *ListEnabledProductsForImportInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEnabledProductsForImportInput) SetNextToken(v string) *ListEnabledProductsForImportInput { + s.NextToken = &v + return s +} + +type ListEnabledProductsForImportOutput struct { + _ struct{} `type:"structure"` + + // The token that is required for pagination. + NextToken *string `type:"string"` + + // A list of ARNs for the resources that represent your subscriptions to products. + ProductSubscriptions []*string `type:"list"` +} + +// String returns the string representation +func (s ListEnabledProductsForImportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEnabledProductsForImportOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEnabledProductsForImportOutput) SetNextToken(v string) *ListEnabledProductsForImportOutput { + s.NextToken = &v + return s +} + +// SetProductSubscriptions sets the ProductSubscriptions field's value. +func (s *ListEnabledProductsForImportOutput) SetProductSubscriptions(v []*string) *ListEnabledProductsForImportOutput { + s.ProductSubscriptions = v + return s +} + +type ListInvitationsInput struct { + _ struct{} `type:"structure"` + + // Indicates the maximum number of items that you want in the response. + MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` + + // Paginates results. Set the value of this parameter to NULL on your first + // call to the ListInvitations operation. For subsequent calls to the operation, + // fill nextToken in the request with the value of NextToken from the previous + // response to continue listing data. + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListInvitationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInvitationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListInvitationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInvitationsInput"} + 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 *ListInvitationsInput) SetMaxResults(v int64) *ListInvitationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInvitationsInput) SetNextToken(v string) *ListInvitationsInput { + s.NextToken = &v + return s +} + +type ListInvitationsOutput struct { + _ struct{} `type:"structure"` + + // The details of the invitations returned by the operation. + Invitations []*Invitation `type:"list"` + + // The token that is required for pagination. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListInvitationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInvitationsOutput) GoString() string { + return s.String() +} + +// SetInvitations sets the Invitations field's value. +func (s *ListInvitationsOutput) SetInvitations(v []*Invitation) *ListInvitationsOutput { + s.Invitations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInvitationsOutput) SetNextToken(v string) *ListInvitationsOutput { + s.NextToken = &v + return s +} + +type ListMembersInput struct { + _ struct{} `type:"structure"` + + // Indicates the maximum number of items that you want in the response. + MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` + + // Paginates results. Set the value of this parameter to NULL on your first + // call to the ListMembers operation. For subsequent calls to the operation, + // fill nextToken in the request with the value of NextToken from the previous + // response to continue listing data. + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` + + // Specifies what member accounts the response includes based on their relationship + // status with the master account. The default value is TRUE. If onlyAssociated + // is set to TRUE, the response includes member accounts whose relationship + // status with the master is set to ENABLED or DISABLED. If onlyAssociated is + // set to FALSE, the response includes all existing member accounts. + OnlyAssociated *bool `location:"querystring" locationName:"OnlyAssociated" type:"boolean"` +} + +// String returns the string representation +func (s ListMembersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMembersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMembersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMembersInput"} + 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 *ListMembersInput) SetMaxResults(v int64) *ListMembersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMembersInput) SetNextToken(v string) *ListMembersInput { + s.NextToken = &v + return s +} + +// SetOnlyAssociated sets the OnlyAssociated field's value. +func (s *ListMembersInput) SetOnlyAssociated(v bool) *ListMembersInput { + s.OnlyAssociated = &v + return s +} + +type ListMembersOutput struct { + _ struct{} `type:"structure"` + + // Member details returned by the operation. + Members []*Member `type:"list"` + + // The token that is required for pagination. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListMembersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMembersOutput) GoString() string { + return s.String() +} + +// SetMembers sets the Members field's value. +func (s *ListMembersOutput) SetMembers(v []*Member) *ListMembersOutput { + s.Members = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMembersOutput) SetNextToken(v string) *ListMembersOutput { + s.NextToken = &v + return s +} + +// A list of malware related to a finding. +type Malware struct { + _ struct{} `type:"structure"` + + // The name of the malware that was observed. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // The filesystem path of the malware that was observed. + Path *string `type:"string"` + + // The state of the malware that was observed. + State *string `type:"string" enum:"MalwareState"` + + // The type of the malware that was observed. + Type *string `type:"string" enum:"MalwareType"` +} + +// String returns the string representation +func (s Malware) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Malware) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Malware) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Malware"} + 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 *Malware) SetName(v string) *Malware { + s.Name = &v + return s +} + +// SetPath sets the Path field's value. +func (s *Malware) SetPath(v string) *Malware { + s.Path = &v + return s +} + +// SetState sets the State field's value. +func (s *Malware) SetState(v string) *Malware { + s.State = &v + return s +} + +// SetType sets the Type field's value. +func (s *Malware) SetType(v string) *Malware { + s.Type = &v + return s +} + +// The map filter for querying findings. +type MapFilter struct { + _ struct{} `type:"structure"` + + // Represents the condition to be applied to a key value when querying for findings + // with a map filter. + Comparison *string `type:"string" enum:"MapFilterComparison"` + + // The key of the map filter. + Key *string `type:"string"` + + // The value for the key in the map filter. + Value *string `type:"string"` +} + +// String returns the string representation +func (s MapFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MapFilter) GoString() string { + return s.String() +} + +// SetComparison sets the Comparison field's value. +func (s *MapFilter) SetComparison(v string) *MapFilter { + s.Comparison = &v + return s +} + +// SetKey sets the Key field's value. +func (s *MapFilter) SetKey(v string) *MapFilter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *MapFilter) SetValue(v string) *MapFilter { + s.Value = &v + return s +} + +// The details for a Security Hub member account. +type Member struct { + _ struct{} `type:"structure"` + + // The AWS account ID of a Security Hub member account. + AccountId *string `type:"string"` + + // The email of a Security Hub member account. + Email *string `type:"string"` + + // Time stamp at which the member account was invited to Security Hub. + InvitedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The AWS account ID of the master Security Hub account to this member account. + MasterId *string `type:"string"` + + // The status of the relationship between the member account and its master + // account. + MemberStatus *string `type:"string"` + + // Time stamp at which this member account was updated. + UpdatedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` +} + +// String returns the string representation +func (s Member) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Member) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *Member) SetAccountId(v string) *Member { + s.AccountId = &v + return s +} + +// SetEmail sets the Email field's value. +func (s *Member) SetEmail(v string) *Member { + s.Email = &v + return s +} + +// SetInvitedAt sets the InvitedAt field's value. +func (s *Member) SetInvitedAt(v time.Time) *Member { + s.InvitedAt = &v + return s +} + +// SetMasterId sets the MasterId field's value. +func (s *Member) SetMasterId(v string) *Member { + s.MasterId = &v + return s +} + +// SetMemberStatus sets the MemberStatus field's value. +func (s *Member) SetMemberStatus(v string) *Member { + s.MemberStatus = &v + return s +} + +// SetUpdatedAt sets the UpdatedAt field's value. +func (s *Member) SetUpdatedAt(v time.Time) *Member { + s.UpdatedAt = &v + return s +} + +// The details of network-related information about a finding. +type Network struct { + _ struct{} `type:"structure"` + + // The destination domain of network-related information about a finding. + DestinationDomain *string `type:"string"` + + // The destination IPv4 address of network-related information about a finding. + DestinationIpV4 *string `type:"string"` + + // The destination IPv6 address of network-related information about a finding. + DestinationIpV6 *string `type:"string"` + + // The destination port of network-related information about a finding. + DestinationPort *int64 `type:"integer"` + + // Indicates the direction of network traffic associated with a finding. + Direction *string `type:"string" enum:"NetworkDirection"` + + // The protocol of network-related information about a finding. + Protocol *string `type:"string"` + + // The source domain of network-related information about a finding. + SourceDomain *string `type:"string"` + + // The source IPv4 address of network-related information about a finding. + SourceIpV4 *string `type:"string"` + + // The source IPv6 address of network-related information about a finding. + SourceIpV6 *string `type:"string"` + + // The source media access control (MAC) address of network-related information + // about a finding. + SourceMac *string `type:"string"` + + // The source port of network-related information about a finding. + SourcePort *int64 `type:"integer"` +} + +// String returns the string representation +func (s Network) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Network) GoString() string { + return s.String() +} + +// SetDestinationDomain sets the DestinationDomain field's value. +func (s *Network) SetDestinationDomain(v string) *Network { + s.DestinationDomain = &v + return s +} + +// SetDestinationIpV4 sets the DestinationIpV4 field's value. +func (s *Network) SetDestinationIpV4(v string) *Network { + s.DestinationIpV4 = &v + return s +} + +// SetDestinationIpV6 sets the DestinationIpV6 field's value. +func (s *Network) SetDestinationIpV6(v string) *Network { + s.DestinationIpV6 = &v + return s +} + +// SetDestinationPort sets the DestinationPort field's value. +func (s *Network) SetDestinationPort(v int64) *Network { + s.DestinationPort = &v + return s +} + +// SetDirection sets the Direction field's value. +func (s *Network) SetDirection(v string) *Network { + s.Direction = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *Network) SetProtocol(v string) *Network { + s.Protocol = &v + return s +} + +// SetSourceDomain sets the SourceDomain field's value. +func (s *Network) SetSourceDomain(v string) *Network { + s.SourceDomain = &v + return s +} + +// SetSourceIpV4 sets the SourceIpV4 field's value. +func (s *Network) SetSourceIpV4(v string) *Network { + s.SourceIpV4 = &v + return s +} + +// SetSourceIpV6 sets the SourceIpV6 field's value. +func (s *Network) SetSourceIpV6(v string) *Network { + s.SourceIpV6 = &v + return s +} + +// SetSourceMac sets the SourceMac field's value. +func (s *Network) SetSourceMac(v string) *Network { + s.SourceMac = &v + return s +} + +// SetSourcePort sets the SourcePort field's value. +func (s *Network) SetSourcePort(v int64) *Network { + s.SourcePort = &v + return s +} + +// A user-defined note added to a finding. +type Note struct { + _ struct{} `type:"structure"` + + // The text of a note. + // + // Text is a required field + Text *string `type:"string" required:"true"` + + // The timestamp of when the note was updated. + // + // UpdatedAt is a required field + UpdatedAt *string `type:"string" required:"true"` + + // The principal that created a note. + // + // UpdatedBy is a required field + UpdatedBy *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Note) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Note) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Note) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Note"} + if s.Text == nil { + invalidParams.Add(request.NewErrParamRequired("Text")) + } + if s.UpdatedAt == nil { + invalidParams.Add(request.NewErrParamRequired("UpdatedAt")) + } + if s.UpdatedBy == nil { + invalidParams.Add(request.NewErrParamRequired("UpdatedBy")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetText sets the Text field's value. +func (s *Note) SetText(v string) *Note { + s.Text = &v + return s +} + +// SetUpdatedAt sets the UpdatedAt field's value. +func (s *Note) SetUpdatedAt(v string) *Note { + s.UpdatedAt = &v + return s +} + +// SetUpdatedBy sets the UpdatedBy field's value. +func (s *Note) SetUpdatedBy(v string) *Note { + s.UpdatedBy = &v + return s +} + +// The updated note. +type NoteUpdate struct { + _ struct{} `type:"structure"` + + // The updated note text. + // + // Text is a required field + Text *string `type:"string" required:"true"` + + // The principal that updated the note. + // + // UpdatedBy is a required field + UpdatedBy *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s NoteUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NoteUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NoteUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NoteUpdate"} + if s.Text == nil { + invalidParams.Add(request.NewErrParamRequired("Text")) + } + if s.UpdatedBy == nil { + invalidParams.Add(request.NewErrParamRequired("UpdatedBy")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetText sets the Text field's value. +func (s *NoteUpdate) SetText(v string) *NoteUpdate { + s.Text = &v + return s +} + +// SetUpdatedBy sets the UpdatedBy field's value. +func (s *NoteUpdate) SetUpdatedBy(v string) *NoteUpdate { + s.UpdatedBy = &v + return s +} + +// A number filter for querying findings. +type NumberFilter struct { + _ struct{} `type:"structure"` + + // Represents the "equal to" condition to be applied to a single field when + // querying for findings. + Eq *float64 `type:"double"` + + // Represents the "greater than equal" condition to be applied to a single field + // when querying for findings. + Gte *float64 `type:"double"` + + // Represents the "less than equal" condition to be applied to a single field + // when querying for findings. + Lte *float64 `type:"double"` +} + +// String returns the string representation +func (s NumberFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NumberFilter) GoString() string { + return s.String() +} + +// SetEq sets the Eq field's value. +func (s *NumberFilter) SetEq(v float64) *NumberFilter { + s.Eq = &v + return s +} + +// SetGte sets the Gte field's value. +func (s *NumberFilter) SetGte(v float64) *NumberFilter { + s.Gte = &v + return s +} + +// SetLte sets the Lte field's value. +func (s *NumberFilter) SetLte(v float64) *NumberFilter { + s.Lte = &v + return s +} + +// The details of process-related information about a finding. +type ProcessDetails struct { + _ struct{} `type:"structure"` + + // The date/time that the process was launched. + LaunchedAt *string `type:"string"` + + // The name of the process. + Name *string `type:"string"` + + // The parent process ID. + ParentPid *int64 `type:"integer"` + + // The path to the process executable. + Path *string `type:"string"` + + // The process ID. + Pid *int64 `type:"integer"` + + // The date/time that the process was terminated. + TerminatedAt *string `type:"string"` +} + +// String returns the string representation +func (s ProcessDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProcessDetails) GoString() string { + return s.String() +} + +// SetLaunchedAt sets the LaunchedAt field's value. +func (s *ProcessDetails) SetLaunchedAt(v string) *ProcessDetails { + s.LaunchedAt = &v + return s +} + +// SetName sets the Name field's value. +func (s *ProcessDetails) SetName(v string) *ProcessDetails { + s.Name = &v + return s +} + +// SetParentPid sets the ParentPid field's value. +func (s *ProcessDetails) SetParentPid(v int64) *ProcessDetails { + s.ParentPid = &v + return s +} + +// SetPath sets the Path field's value. +func (s *ProcessDetails) SetPath(v string) *ProcessDetails { + s.Path = &v + return s +} + +// SetPid sets the Pid field's value. +func (s *ProcessDetails) SetPid(v int64) *ProcessDetails { + s.Pid = &v + return s +} + +// SetTerminatedAt sets the TerminatedAt field's value. +func (s *ProcessDetails) SetTerminatedAt(v string) *ProcessDetails { + s.TerminatedAt = &v + return s +} + +// Provides a recommendation on how to remediate the issue identified within +// a finding. +type Recommendation struct { + _ struct{} `type:"structure"` + + // The recommendation of what to do about the issue described in a finding. + Text *string `type:"string"` + + // A URL to link to general remediation information for the finding type of + // a finding. + Url *string `type:"string"` +} + +// String returns the string representation +func (s Recommendation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Recommendation) GoString() string { + return s.String() +} + +// SetText sets the Text field's value. +func (s *Recommendation) SetText(v string) *Recommendation { + s.Text = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *Recommendation) SetUrl(v string) *Recommendation { + s.Url = &v + return s +} + +// Related finding's details. +type RelatedFinding struct { + _ struct{} `type:"structure"` + + // The solution-generated identifier for a related finding. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The ARN of the solution that generated a related finding. + // + // ProductArn is a required field + ProductArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RelatedFinding) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelatedFinding) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RelatedFinding) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RelatedFinding"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.ProductArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProductArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *RelatedFinding) SetId(v string) *RelatedFinding { + s.Id = &v + return s +} + +// SetProductArn sets the ProductArn field's value. +func (s *RelatedFinding) SetProductArn(v string) *RelatedFinding { + s.ProductArn = &v + return s +} + +// The remediation options for a finding. +type Remediation struct { + _ struct{} `type:"structure"` + + // Provides a recommendation on how to remediate the issue identified within + // a finding. + Recommendation *Recommendation `type:"structure"` +} + +// String returns the string representation +func (s Remediation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Remediation) GoString() string { + return s.String() +} + +// SetRecommendation sets the Recommendation field's value. +func (s *Remediation) SetRecommendation(v *Recommendation) *Remediation { + s.Recommendation = v + return s +} + +// A resource data type that describes a resource to which the finding refers. +type Resource struct { + _ struct{} `type:"structure"` + + // Provides additional details about the resource. + Details *ResourceDetails `type:"structure"` + + // The canonical identifier for the given resource type. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The canonical AWS partition name to which the region is assigned. + Partition *string `type:"string" enum:"Partition"` + + // The canonical AWS external region name where this resource is located. + Region *string `type:"string"` + + // A list of AWS tags associated with a resource at the time the finding was + // processed. + Tags map[string]*string `type:"map"` + + // Specifies the type of the resource for which details are provided. + // + // Type is a required field + Type *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Resource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Resource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Resource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Resource"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetails sets the Details field's value. +func (s *Resource) SetDetails(v *ResourceDetails) *Resource { + s.Details = v + return s +} + +// SetId sets the Id field's value. +func (s *Resource) SetId(v string) *Resource { + s.Id = &v + return s +} + +// SetPartition sets the Partition field's value. +func (s *Resource) SetPartition(v string) *Resource { + s.Partition = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *Resource) SetRegion(v string) *Resource { + s.Region = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Resource) SetTags(v map[string]*string) *Resource { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *Resource) SetType(v string) *Resource { + s.Type = &v + return s +} + +// Provides additional details about the resource. +type ResourceDetails struct { + _ struct{} `type:"structure"` + + // The details of an AWS EC2 instance. + AwsEc2Instance *AwsEc2InstanceDetails `type:"structure"` + + // AWS IAM access key details related to a finding. + AwsIamAccessKey *AwsIamAccessKeyDetails `type:"structure"` + + // The details of an AWS S3 Bucket. + AwsS3Bucket *AwsS3BucketDetails `type:"structure"` + + // Container details related to a finding. + Container *ContainerDetails `type:"structure"` + + // The details of a resource that does not have a specific sub-field for the + // resource type defined. + Other map[string]*string `type:"map"` +} + +// String returns the string representation +func (s ResourceDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceDetails) GoString() string { + return s.String() +} + +// SetAwsEc2Instance sets the AwsEc2Instance field's value. +func (s *ResourceDetails) SetAwsEc2Instance(v *AwsEc2InstanceDetails) *ResourceDetails { + s.AwsEc2Instance = v + return s +} + +// SetAwsIamAccessKey sets the AwsIamAccessKey field's value. +func (s *ResourceDetails) SetAwsIamAccessKey(v *AwsIamAccessKeyDetails) *ResourceDetails { + s.AwsIamAccessKey = v + return s +} + +// SetAwsS3Bucket sets the AwsS3Bucket field's value. +func (s *ResourceDetails) SetAwsS3Bucket(v *AwsS3BucketDetails) *ResourceDetails { + s.AwsS3Bucket = v + return s +} + +// SetContainer sets the Container field's value. +func (s *ResourceDetails) SetContainer(v *ContainerDetails) *ResourceDetails { + s.Container = v + return s +} + +// SetOther sets the Other field's value. +func (s *ResourceDetails) SetOther(v map[string]*string) *ResourceDetails { + s.Other = v + return s +} + +// The account details that could not be processed. +type Result struct { + _ struct{} `type:"structure"` + + // An ID of the AWS account that could not be processed. + AccountId *string `type:"string"` + + // The reason for why an account could not be processed. + ProcessingResult *string `type:"string"` +} + +// String returns the string representation +func (s Result) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Result) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *Result) SetAccountId(v string) *Result { + s.AccountId = &v + return s +} + +// SetProcessingResult sets the ProcessingResult field's value. +func (s *Result) SetProcessingResult(v string) *Result { + s.ProcessingResult = &v + return s +} + +// A finding's severity. +type Severity struct { + _ struct{} `type:"structure"` + + // The normalized severity of a finding. + // + // Normalized is a required field + Normalized *int64 `type:"integer" required:"true"` + + // The native severity as defined by the security findings provider's solution + // that generated the finding. + Product *float64 `type:"double"` +} + +// String returns the string representation +func (s Severity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Severity) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Severity) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Severity"} + if s.Normalized == nil { + invalidParams.Add(request.NewErrParamRequired("Normalized")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNormalized sets the Normalized field's value. +func (s *Severity) SetNormalized(v int64) *Severity { + s.Normalized = &v + return s +} + +// SetProduct sets the Product field's value. +func (s *Severity) SetProduct(v float64) *Severity { + s.Product = &v + return s +} + +// A collection of attributes used for sorting findings. +type SortCriterion struct { + _ struct{} `type:"structure"` + + // The finding attribute used for sorting findings. + Field *string `type:"string"` + + // The order used for sorting findings. + SortOrder *string `type:"string" enum:"SortOrder"` +} + +// String returns the string representation +func (s SortCriterion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SortCriterion) GoString() string { + return s.String() +} + +// SetField sets the Field field's value. +func (s *SortCriterion) SetField(v string) *SortCriterion { + s.Field = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *SortCriterion) SetSortOrder(v string) *SortCriterion { + s.SortOrder = &v + return s +} + +// A resource that represents your subscription to a supported standard. +type StandardsSubscription struct { + _ struct{} `type:"structure"` + + // The ARN of a standard. + // + // StandardsArn is a required field + StandardsArn *string `type:"string" required:"true"` + + // StandardsInput is a required field + StandardsInput map[string]*string `type:"map" required:"true"` + + // The standard's status. + // + // StandardsStatus is a required field + StandardsStatus *string `type:"string" required:"true" enum:"StandardsStatus"` + + // The ARN of a resource that represents your subscription to a supported standard. + // + // StandardsSubscriptionArn is a required field + StandardsSubscriptionArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StandardsSubscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StandardsSubscription) GoString() string { + return s.String() +} + +// SetStandardsArn sets the StandardsArn field's value. +func (s *StandardsSubscription) SetStandardsArn(v string) *StandardsSubscription { + s.StandardsArn = &v + return s +} + +// SetStandardsInput sets the StandardsInput field's value. +func (s *StandardsSubscription) SetStandardsInput(v map[string]*string) *StandardsSubscription { + s.StandardsInput = v + return s +} + +// SetStandardsStatus sets the StandardsStatus field's value. +func (s *StandardsSubscription) SetStandardsStatus(v string) *StandardsSubscription { + s.StandardsStatus = &v + return s +} + +// SetStandardsSubscriptionArn sets the StandardsSubscriptionArn field's value. +func (s *StandardsSubscription) SetStandardsSubscriptionArn(v string) *StandardsSubscription { + s.StandardsSubscriptionArn = &v + return s +} + +// The standard that you want to enable. +type StandardsSubscriptionRequest struct { + _ struct{} `type:"structure"` + + // The ARN of the standard that you want to enable. + // + // StandardsArn is a required field + StandardsArn *string `type:"string" required:"true"` + + StandardsInput map[string]*string `type:"map"` +} + +// String returns the string representation +func (s StandardsSubscriptionRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StandardsSubscriptionRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StandardsSubscriptionRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StandardsSubscriptionRequest"} + if s.StandardsArn == nil { + invalidParams.Add(request.NewErrParamRequired("StandardsArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStandardsArn sets the StandardsArn field's value. +func (s *StandardsSubscriptionRequest) SetStandardsArn(v string) *StandardsSubscriptionRequest { + s.StandardsArn = &v + return s +} + +// SetStandardsInput sets the StandardsInput field's value. +func (s *StandardsSubscriptionRequest) SetStandardsInput(v map[string]*string) *StandardsSubscriptionRequest { + s.StandardsInput = v + return s +} + +// A string filter for querying findings. +type StringFilter struct { + _ struct{} `type:"structure"` + + // Represents the condition to be applied to a string value when querying for + // findings. + Comparison *string `type:"string" enum:"StringFilterComparison"` + + // The string filter value. + Value *string `type:"string"` +} + +// String returns the string representation +func (s StringFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StringFilter) GoString() string { + return s.String() +} + +// SetComparison sets the Comparison field's value. +func (s *StringFilter) SetComparison(v string) *StringFilter { + s.Comparison = &v + return s +} + +// SetValue sets the Value field's value. +func (s *StringFilter) SetValue(v string) *StringFilter { + s.Value = &v + return s +} + +// Threat intel details related to a finding. +type ThreatIntelIndicator struct { + _ struct{} `type:"structure"` + + // The category of a threat intel indicator. + Category *string `type:"string" enum:"ThreatIntelIndicatorCategory"` + + // The date/time of the last observation of a threat intel indicator. + LastObservedAt *string `type:"string"` + + // The source of the threat intel. + Source *string `type:"string"` + + // The URL for more details from the source of the threat intel. + SourceUrl *string `type:"string"` + + // The type of a threat intel indicator. + Type *string `type:"string" enum:"ThreatIntelIndicatorType"` + + // The value of a threat intel indicator. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ThreatIntelIndicator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThreatIntelIndicator) GoString() string { + return s.String() +} + +// SetCategory sets the Category field's value. +func (s *ThreatIntelIndicator) SetCategory(v string) *ThreatIntelIndicator { + s.Category = &v + return s +} + +// SetLastObservedAt sets the LastObservedAt field's value. +func (s *ThreatIntelIndicator) SetLastObservedAt(v string) *ThreatIntelIndicator { + s.LastObservedAt = &v + return s +} + +// SetSource sets the Source field's value. +func (s *ThreatIntelIndicator) SetSource(v string) *ThreatIntelIndicator { + s.Source = &v + return s +} + +// SetSourceUrl sets the SourceUrl field's value. +func (s *ThreatIntelIndicator) SetSourceUrl(v string) *ThreatIntelIndicator { + s.SourceUrl = &v + return s +} + +// SetType sets the Type field's value. +func (s *ThreatIntelIndicator) SetType(v string) *ThreatIntelIndicator { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ThreatIntelIndicator) SetValue(v string) *ThreatIntelIndicator { + s.Value = &v + return s +} + +type UpdateFindingsInput struct { + _ struct{} `type:"structure"` + + // A collection of attributes that specify what findings you want to update. + // + // Filters is a required field + Filters *AwsSecurityFindingFilters `type:"structure" required:"true"` + + // The updated note for the finding. + Note *NoteUpdate `type:"structure"` + + // The updated record state for the finding. + RecordState *string `type:"string" enum:"RecordState"` +} + +// String returns the string representation +func (s UpdateFindingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFindingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFindingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFindingsInput"} + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + if s.Note != nil { + if err := s.Note.Validate(); err != nil { + invalidParams.AddNested("Note", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *UpdateFindingsInput) SetFilters(v *AwsSecurityFindingFilters) *UpdateFindingsInput { + s.Filters = v + return s +} + +// SetNote sets the Note field's value. +func (s *UpdateFindingsInput) SetNote(v *NoteUpdate) *UpdateFindingsInput { + s.Note = v + return s +} + +// SetRecordState sets the RecordState field's value. +func (s *UpdateFindingsInput) SetRecordState(v string) *UpdateFindingsInput { + s.RecordState = &v + return s +} + +type UpdateFindingsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateFindingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFindingsOutput) GoString() string { + return s.String() +} + +type UpdateInsightInput struct { + _ struct{} `type:"structure"` + + // The updated filters that define this insight. + Filters *AwsSecurityFindingFilters `type:"structure"` + + // The updated GroupBy attribute that defines this insight. + GroupByAttribute *string `type:"string"` + + // The ARN of the insight that you want to update. + // + // InsightArn is a required field + InsightArn *string `location:"uri" locationName:"InsightArn" type:"string" required:"true"` + + // The updated name for the insight. + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateInsightInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInsightInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInsightInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInsightInput"} + if s.InsightArn == nil { + invalidParams.Add(request.NewErrParamRequired("InsightArn")) + } + if s.InsightArn != nil && len(*s.InsightArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InsightArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *UpdateInsightInput) SetFilters(v *AwsSecurityFindingFilters) *UpdateInsightInput { + s.Filters = v + return s +} + +// SetGroupByAttribute sets the GroupByAttribute field's value. +func (s *UpdateInsightInput) SetGroupByAttribute(v string) *UpdateInsightInput { + s.GroupByAttribute = &v + return s +} + +// SetInsightArn sets the InsightArn field's value. +func (s *UpdateInsightInput) SetInsightArn(v string) *UpdateInsightInput { + s.InsightArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateInsightInput) SetName(v string) *UpdateInsightInput { + s.Name = &v + return s +} + +type UpdateInsightOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateInsightOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInsightOutput) GoString() string { + return s.String() +} + +const ( + // AwsIamAccessKeyStatusActive is a AwsIamAccessKeyStatus enum value + AwsIamAccessKeyStatusActive = "Active" + + // AwsIamAccessKeyStatusInactive is a AwsIamAccessKeyStatus enum value + AwsIamAccessKeyStatusInactive = "Inactive" +) + +const ( + // ComplianceStatusPassed is a ComplianceStatus enum value + ComplianceStatusPassed = "PASSED" + + // ComplianceStatusWarning is a ComplianceStatus enum value + ComplianceStatusWarning = "WARNING" + + // ComplianceStatusFailed is a ComplianceStatus enum value + ComplianceStatusFailed = "FAILED" + + // ComplianceStatusNotAvailable is a ComplianceStatus enum value + ComplianceStatusNotAvailable = "NOT_AVAILABLE" +) + +const ( + // DateRangeUnitDays is a DateRangeUnit enum value + DateRangeUnitDays = "DAYS" +) + +const ( + // MalwareStateObserved is a MalwareState enum value + MalwareStateObserved = "OBSERVED" + + // MalwareStateRemovalFailed is a MalwareState enum value + MalwareStateRemovalFailed = "REMOVAL_FAILED" + + // MalwareStateRemoved is a MalwareState enum value + MalwareStateRemoved = "REMOVED" +) + +const ( + // MalwareTypeAdware is a MalwareType enum value + MalwareTypeAdware = "ADWARE" + + // MalwareTypeBlendedThreat is a MalwareType enum value + MalwareTypeBlendedThreat = "BLENDED_THREAT" + + // MalwareTypeBotnetAgent is a MalwareType enum value + MalwareTypeBotnetAgent = "BOTNET_AGENT" + + // MalwareTypeCoinMiner is a MalwareType enum value + MalwareTypeCoinMiner = "COIN_MINER" + + // MalwareTypeExploitKit is a MalwareType enum value + MalwareTypeExploitKit = "EXPLOIT_KIT" + + // MalwareTypeKeylogger is a MalwareType enum value + MalwareTypeKeylogger = "KEYLOGGER" + + // MalwareTypeMacro is a MalwareType enum value + MalwareTypeMacro = "MACRO" + + // MalwareTypePotentiallyUnwanted is a MalwareType enum value + MalwareTypePotentiallyUnwanted = "POTENTIALLY_UNWANTED" + + // MalwareTypeSpyware is a MalwareType enum value + MalwareTypeSpyware = "SPYWARE" + + // MalwareTypeRansomware is a MalwareType enum value + MalwareTypeRansomware = "RANSOMWARE" + + // MalwareTypeRemoteAccess is a MalwareType enum value + MalwareTypeRemoteAccess = "REMOTE_ACCESS" + + // MalwareTypeRootkit is a MalwareType enum value + MalwareTypeRootkit = "ROOTKIT" + + // MalwareTypeTrojan is a MalwareType enum value + MalwareTypeTrojan = "TROJAN" + + // MalwareTypeVirus is a MalwareType enum value + MalwareTypeVirus = "VIRUS" + + // MalwareTypeWorm is a MalwareType enum value + MalwareTypeWorm = "WORM" +) + +const ( + // MapFilterComparisonContains is a MapFilterComparison enum value + MapFilterComparisonContains = "CONTAINS" +) + +const ( + // NetworkDirectionIn is a NetworkDirection enum value + NetworkDirectionIn = "IN" + + // NetworkDirectionOut is a NetworkDirection enum value + NetworkDirectionOut = "OUT" +) + +const ( + // PartitionAws is a Partition enum value + PartitionAws = "aws" + + // PartitionAwsCn is a Partition enum value + PartitionAwsCn = "aws-cn" + + // PartitionAwsUsGov is a Partition enum value + PartitionAwsUsGov = "aws-us-gov" +) + +const ( + // RecordStateActive is a RecordState enum value + RecordStateActive = "ACTIVE" + + // RecordStateArchived is a RecordState enum value + RecordStateArchived = "ARCHIVED" +) + +const ( + // SortOrderAsc is a SortOrder enum value + SortOrderAsc = "asc" + + // SortOrderDesc is a SortOrder enum value + SortOrderDesc = "desc" +) + +const ( + // StandardsStatusPending is a StandardsStatus enum value + StandardsStatusPending = "PENDING" + + // StandardsStatusReady is a StandardsStatus enum value + StandardsStatusReady = "READY" + + // StandardsStatusFailed is a StandardsStatus enum value + StandardsStatusFailed = "FAILED" + + // StandardsStatusDeleting is a StandardsStatus enum value + StandardsStatusDeleting = "DELETING" +) + +const ( + // StringFilterComparisonEquals is a StringFilterComparison enum value + StringFilterComparisonEquals = "EQUALS" + + // StringFilterComparisonContains is a StringFilterComparison enum value + StringFilterComparisonContains = "CONTAINS" + + // StringFilterComparisonPrefix is a StringFilterComparison enum value + StringFilterComparisonPrefix = "PREFIX" +) + +const ( + // ThreatIntelIndicatorCategoryBackdoor is a ThreatIntelIndicatorCategory enum value + ThreatIntelIndicatorCategoryBackdoor = "BACKDOOR" + + // ThreatIntelIndicatorCategoryCardStealer is a ThreatIntelIndicatorCategory enum value + ThreatIntelIndicatorCategoryCardStealer = "CARD_STEALER" + + // ThreatIntelIndicatorCategoryCommandAndControl is a ThreatIntelIndicatorCategory enum value + ThreatIntelIndicatorCategoryCommandAndControl = "COMMAND_AND_CONTROL" + + // ThreatIntelIndicatorCategoryDropSite is a ThreatIntelIndicatorCategory enum value + ThreatIntelIndicatorCategoryDropSite = "DROP_SITE" + + // ThreatIntelIndicatorCategoryExploitSite is a ThreatIntelIndicatorCategory enum value + ThreatIntelIndicatorCategoryExploitSite = "EXPLOIT_SITE" + + // ThreatIntelIndicatorCategoryKeylogger is a ThreatIntelIndicatorCategory enum value + ThreatIntelIndicatorCategoryKeylogger = "KEYLOGGER" +) + +const ( + // ThreatIntelIndicatorTypeDomain is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeDomain = "DOMAIN" + + // ThreatIntelIndicatorTypeEmailAddress is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeEmailAddress = "EMAIL_ADDRESS" + + // ThreatIntelIndicatorTypeHashMd5 is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeHashMd5 = "HASH_MD5" + + // ThreatIntelIndicatorTypeHashSha1 is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeHashSha1 = "HASH_SHA1" + + // ThreatIntelIndicatorTypeHashSha256 is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeHashSha256 = "HASH_SHA256" + + // ThreatIntelIndicatorTypeHashSha512 is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeHashSha512 = "HASH_SHA512" + + // ThreatIntelIndicatorTypeIpv4Address is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeIpv4Address = "IPV4_ADDRESS" + + // ThreatIntelIndicatorTypeIpv6Address is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeIpv6Address = "IPV6_ADDRESS" + + // ThreatIntelIndicatorTypeMutex is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeMutex = "MUTEX" + + // ThreatIntelIndicatorTypeProcess is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeProcess = "PROCESS" + + // ThreatIntelIndicatorTypeUrl is a ThreatIntelIndicatorType enum value + ThreatIntelIndicatorTypeUrl = "URL" +) + +const ( + // VerificationStateUnknown is a VerificationState enum value + VerificationStateUnknown = "UNKNOWN" + + // VerificationStateTruePositive is a VerificationState enum value + VerificationStateTruePositive = "TRUE_POSITIVE" + + // VerificationStateFalsePositive is a VerificationState enum value + VerificationStateFalsePositive = "FALSE_POSITIVE" + + // VerificationStateBenignPositive is a VerificationState enum value + VerificationStateBenignPositive = "BENIGN_POSITIVE" +) + +const ( + // WorkflowStateNew is a WorkflowState enum value + WorkflowStateNew = "NEW" + + // WorkflowStateAssigned is a WorkflowState enum value + WorkflowStateAssigned = "ASSIGNED" + + // WorkflowStateInProgress is a WorkflowState enum value + WorkflowStateInProgress = "IN_PROGRESS" + + // WorkflowStateDeferred is a WorkflowState enum value + WorkflowStateDeferred = "DEFERRED" + + // WorkflowStateResolved is a WorkflowState enum value + WorkflowStateResolved = "RESOLVED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/securityhub/doc.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/doc.go new file mode 100644 index 000000000..1a1fc7037 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/securityhub/doc.go @@ -0,0 +1,33 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package securityhub provides the client and types for making API +// requests to AWS SecurityHub. +// +// AWS Security Hub provides you with a comprehensive view of your security +// state within AWS and your compliance with the security industry standards +// and best practices. Security Hub collects security data from across AWS accounts, +// services, and supported third-party partners and helps you analyze your security +// trends and identify the highest priority security issues. For more information, +// see AWS Security Hub User Guide. +// +// See https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26 for more information on this service. +// +// See securityhub package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/securityhub/ +// +// Using the Client +// +// To contact AWS SecurityHub 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 SecurityHub client SecurityHub for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/securityhub/#New +package securityhub diff --git a/vendor/github.com/aws/aws-sdk-go/service/securityhub/errors.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/errors.go new file mode 100644 index 000000000..431be4d26 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/securityhub/errors.go @@ -0,0 +1,32 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package securityhub + +const ( + + // ErrCodeInternalException for service response error code + // "InternalException". + // + // Internal server error. + ErrCodeInternalException = "InternalException" + + // ErrCodeInvalidInputException for service response error code + // "InvalidInputException". + // + // The request was rejected because an invalid or out-of-range value was supplied + // for an input parameter. + ErrCodeInvalidInputException = "InvalidInputException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The request was rejected because it attempted to create resources beyond + // the current AWS account limits. The error code describes the limit exceeded. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The request was rejected because the specified resource cannot be found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/securityhub/service.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/service.go new file mode 100644 index 000000000..14e34aba3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/securityhub/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package securityhub + +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" +) + +// SecurityHub provides the API operation methods for making requests to +// AWS SecurityHub. See this package's package overview docs +// for details on the service. +// +// SecurityHub methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type SecurityHub 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 = "SecurityHub" // Name of service. + EndpointsID = "securityhub" // ID to lookup a service endpoint with. + ServiceID = "SecurityHub" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the SecurityHub 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 SecurityHub client from just a session. +// svc := securityhub.New(mySession) +// +// // Create a SecurityHub client with additional configuration +// svc := securityhub.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *SecurityHub { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "securityhub" + } + 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) *SecurityHub { + svc := &SecurityHub{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-10-26", + 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 SecurityHub operation and runs any +// custom request initialization. +func (c *SecurityHub) 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/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go index 79a4a3a89..383edf5bb 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" @@ -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 } @@ -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 } @@ -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 } @@ -311,6 +316,7 @@ func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifactRequest(i output = &AssociateServiceActionWithProvisioningArtifactOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -398,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 } @@ -930,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 @@ -951,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) @@ -1460,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 } @@ -1542,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 } @@ -1641,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 @@ -1654,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) @@ -1715,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 } @@ -1809,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 } @@ -1891,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 } @@ -1982,6 +2008,7 @@ func (c *ServiceCatalog) DeleteServiceActionRequest(input *DeleteServiceActionIn output = &DeleteServiceActionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2065,6 +2092,7 @@ func (c *ServiceCatalog) DeleteTagOptionRequest(input *DeleteTagOptionInput) (re output = &DeleteTagOptionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2353,6 +2381,92 @@ 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 @@ -3173,6 +3287,98 @@ 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 @@ -3212,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 } @@ -3294,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 } @@ -3380,6 +3588,7 @@ func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifactReques output = &DisassociateServiceActionFromProvisioningArtifactOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3460,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 } @@ -3505,6 +3715,101 @@ 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 @@ -3680,6 +3985,89 @@ func (c *ServiceCatalog) ExecuteProvisionedProductServiceActionWithContext(ctx a 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 @@ -3743,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) @@ -4093,6 +4484,148 @@ func (c *ServiceCatalog) ListLaunchPathsPagesWithContext(ctx aws.Context, input return p.Err() } +const opListOrganizationPortfolioAccess = "ListOrganizationPortfolioAccess" + +// 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// 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 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/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 @@ -5658,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 } @@ -6897,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 @@ -6937,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"` } @@ -7588,6 +8142,8 @@ type ConstraintDetail struct { // // * NOTIFICATION // + // * STACKSET + // // * TEMPLATE Type *string `min:"1" type:"string"` } @@ -7639,6 +8195,8 @@ type ConstraintSummary struct { // // * NOTIFICATION // + // * STACKSET + // // * TEMPLATE Type *string `min:"1" type:"string"` } @@ -7831,11 +8389,27 @@ type CreateConstraintInput struct { // // 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). @@ -7859,6 +8433,8 @@ type CreateConstraintInput struct { // // * NOTIFICATION // + // * STACKSET + // // * TEMPLATE // // Type is a required field @@ -8159,10 +8735,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. // @@ -8183,9 +8764,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")) } @@ -8211,6 +8789,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 @@ -8219,6 +8803,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 @@ -8231,6 +8819,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"` @@ -9236,9 +9830,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. // @@ -9259,9 +9854,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")) } @@ -9287,6 +9879,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 @@ -9295,6 +9893,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 @@ -9307,6 +9909,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"` @@ -9960,6 +10568,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"` @@ -10667,6 +11374,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"` @@ -10697,6 +11408,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 @@ -10972,6 +11689,34 @@ func (s *DescribeTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *Descri 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"` @@ -11319,6 +12064,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"` @@ -11592,6 +12365,43 @@ func (s *FailedServiceActionAssociation) SetServiceActionId(v string) *FailedSer 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"` @@ -11664,6 +12474,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 @@ -11965,6 +12778,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"` @@ -13261,6 +14203,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"` @@ -13646,6 +14621,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"` } @@ -13700,6 +14679,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 { @@ -13765,6 +14749,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 @@ -13852,7 +14842,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. @@ -14014,7 +15004,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"` } @@ -14516,6 +15506,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 { @@ -14740,6 +15776,157 @@ func (s *ProvisioningParameter) SetValue(v string) *ProvisioningParameter { 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 ProvisioningPreferences 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"` + + // 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 ProvisioningPreferences) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningPreferences) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +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 { + return invalidParams + } + return nil +} + +// SetStackSetAccounts sets the StackSetAccounts field's value. +func (s *ProvisioningPreferences) SetStackSetAccounts(v []*string) *ProvisioningPreferences { + s.StackSetAccounts = v + return s +} + +// 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 +} + // Information about a request operation. type RecordDetail struct { _ struct{} `type:"structure"` @@ -14759,7 +15946,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. @@ -15017,6 +16204,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 @@ -15057,6 +16258,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"` } @@ -15940,6 +17147,81 @@ func (s *ServiceActionSummary) SetName(v string) *ServiceActionSummary { 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"` +} + +// String returns the string representation +func (s ShareDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShareDetails) GoString() string { + return s.String() +} + +// SetShareErrors sets the ShareErrors field's value. +func (s *ShareDetails) SetShareErrors(v []*ShareError) *ShareDetails { + s.ShareErrors = v + return s +} + +// SetSuccessfulShares sets the SuccessfulShares field's value. +func (s *ShareDetails) SetSuccessfulShares(v []*string) *ShareDetails { + s.SuccessfulShares = v + return s +} + +// Errors that occurred during the portfolio share operation. +type ShareError struct { + _ struct{} `type:"structure"` + + // List of accounts impacted by the error. + Accounts []*string `type:"list"` + + // Error type that happened when processing the operation. + Error *string `type:"string"` + + // Information about the error. + Message *string `type:"string"` +} + +// String returns the string representation +func (s ShareError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShareError) GoString() string { + return s.String() +} + +// SetAccounts sets the Accounts field's value. +func (s *ShareError) SetAccounts(v []*string) *ShareError { + s.Accounts = v + return s +} + +// SetError sets the Error field's value. +func (s *ShareError) SetError(v string) *ShareError { + s.Error = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ShareError) SetMessage(v string) *ShareError { + s.Message = &v + return s +} + // Information about a tag. A tag is a key-value pair. Tags are propagated to // the resources created when provisioning a product. type Tag struct { @@ -16652,7 +17934,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 @@ -16669,6 +17951,10 @@ 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 @@ -16719,6 +18005,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 @@ -16768,6 +18059,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 @@ -16993,6 +18290,181 @@ 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"` @@ -17234,6 +18706,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" @@ -17269,12 +18752,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 ( @@ -17478,6 +18975,23 @@ const ( 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" @@ -17486,6 +19000,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 414280824..357d9e52f 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 c9d272a66..bca3bcb65 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,6 +13,103 @@ 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 @@ -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. @@ -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. @@ -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 @@ -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. @@ -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. @@ -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,6 +697,95 @@ 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 @@ -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. @@ -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. @@ -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. @@ -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. // @@ -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. @@ -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) { @@ -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) { @@ -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) { @@ -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) { @@ -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. @@ -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) { @@ -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. // - // For information about the charges for health checks, see Route 53 Pricing - // (http://aws.amazon.com/route53/pricing). + // 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 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 0358f1217..9ada164cf 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 d1f9f8dcd..0238a42ba 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 b5c177a62..3463e12c2 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 70f022105..691f57e58 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -4724,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 } @@ -4811,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 } @@ -4902,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 } @@ -4987,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 } @@ -5068,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 } @@ -5150,6 +5171,7 @@ func (c *SES) SetIdentityNotificationTopicRequest(input *SetIdentityNotification output = &SetIdentityNotificationTopicOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5234,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 } @@ -5413,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 } @@ -5495,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 } @@ -5600,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 } @@ -5687,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 } @@ -5774,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 } @@ -5870,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 } @@ -5966,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 } @@ -6074,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 } @@ -6329,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 } @@ -6405,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 } 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 52da5bab5..84814af1b 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 @@ -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 opCreateActivity = "CreateActivity" @@ -54,12 +56,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 @@ -236,6 +238,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 } @@ -315,6 +318,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 } @@ -406,6 +410,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. @@ -488,6 +495,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. @@ -570,6 +580,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. @@ -652,6 +665,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. @@ -743,6 +759,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. @@ -837,9 +857,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 60 seconds. 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 @@ -982,9 +1004,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 60 seconds. 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 @@ -1120,10 +1147,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 60 seconds. 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 @@ -1266,9 +1299,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 60 seconds. 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 @@ -1392,6 +1430,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 } @@ -1475,6 +1514,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 } @@ -1570,6 +1610,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 } @@ -1664,6 +1705,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. @@ -1846,12 +1893,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 +1946,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 +2039,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 +2081,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 +2151,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 +2176,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 +2304,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 +2687,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 +2708,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 +2832,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 +2950,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 +3040,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 +3073,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 +3197,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 +3231,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 +3250,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 +3343,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 +3383,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 60 seconds. 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 +3461,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 60 seconds. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -3450,11 +3495,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 +3507,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 +3526,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 +3534,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 +3564,30 @@ 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"` + + TaskSubmitFailedEventDetails *TaskSubmitFailedEventDetails `locationName:"taskSubmitFailedEventDetails" type:"structure"` + + TaskSubmittedEventDetails *TaskSubmittedEventDetails `locationName:"taskSubmittedEventDetails" type:"structure"` + + // Contains details about the start of connected service by a task state. + TaskSucceededEventDetails *TaskSucceededEventDetails `locationName:"taskSucceededEventDetails" type:"structure"` + + // Contains details about a connected service timeout that occured 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 +3734,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 +3794,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 +3827,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 +3866,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 +3905,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 +3938,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 +3963,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 +4002,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 60 seconds. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -3947,12 +4059,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 60 seconds. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -3983,18 +4094,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 60 seconds. 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 +4178,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 60 seconds. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -4104,18 +4213,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 60 seconds. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -4157,12 +4265,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 60 seconds. 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 @@ -4195,10 +4302,10 @@ type SendTaskFailureInput 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"` - // An arbitrary error code that identifies the cause of the failure. - Error *string `locationName:"error" type:"string"` + // 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 +4434,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 +4507,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 +4621,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 +4673,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 +4761,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 +4842,427 @@ func (s *StopExecutionOutput) SetStopDate(v time.Time) *StopExecutionOutput { return s } +// 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 connected service in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the connected service 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 connected service referenced in a task state. + // + // Parameters is a required field + Parameters *string `locationName:"parameters" type:"string" required:"true" sensitive:"true"` + + // Region is a required field + Region *string `locationName:"region" min:"1" type:"string" required:"true"` + + // The service name of the connected service in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the connected service 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 connected service in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the connected service 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 connected service in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the connected service 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 +} + +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 connected service in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the connected service 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 +} + +type TaskSubmittedEventDetails struct { + _ struct{} `type:"structure"` + + // The response from a connected service when a task has started. + Output *string `locationName:"output" type:"string" sensitive:"true"` + + // The service name of the connected service in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the connected service 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 start of connected service by a task state. +type TaskSucceededEventDetails struct { + _ struct{} `type:"structure"` + + // The full JSON response from a connected service 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 connected service in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the connected service 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 connected service timeout that occured 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 connected service in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the connected service 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 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 +5390,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/simpledb/api.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go index 372e87e3e..8304b0635 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } 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 43d3f9160..f45a4a594 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 @@ -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 } @@ -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) @@ -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 } @@ -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 } @@ -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 } @@ -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) @@ -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 } @@ -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) @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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) @@ -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) @@ -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. // - // Valid values: DeliveryPolicy | FilterPolicy | RawMessageDelivery + // 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. // // 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. // - // Valid values: Policy | DisplayName | DeliveryPolicy + // 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. + // + // * 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 9d2993bcc..9a16c083f 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 df375a702..16f82a4b2 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 @@ -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 } @@ -162,8 +161,7 @@ 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 } @@ -509,8 +507,7 @@ 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 } @@ -714,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 } @@ -1244,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 } @@ -1470,8 +1465,7 @@ 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 } @@ -1767,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 } @@ -1859,8 +1852,7 @@ 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 } @@ -1959,8 +1951,7 @@ 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 } 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 5dd17c4d9..e85e89a81 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/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index 5c88b4314..eac9dcdac 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" @@ -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 } @@ -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 } @@ -448,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 @@ -581,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 @@ -981,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 } @@ -1079,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 } @@ -1173,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 } @@ -1282,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 } @@ -1550,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 } @@ -1795,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 } @@ -1880,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 } @@ -8298,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 } @@ -8395,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 } @@ -9172,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 } @@ -9353,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 } @@ -9573,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 } @@ -9854,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 } @@ -10285,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. // @@ -10297,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) @@ -10739,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 } @@ -11216,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"` @@ -11234,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"` @@ -11284,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 @@ -11320,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 @@ -11868,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"` @@ -11875,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"` @@ -11922,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 @@ -11934,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 @@ -11964,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 { @@ -12019,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"` @@ -12034,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"` @@ -12150,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 @@ -12174,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 @@ -12263,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"` @@ -12344,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 @@ -12928,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: @@ -12951,19 +13237,17 @@ type CommandFilter struct { // // Cancelling // - // * DocumentName: The name of the SSM document for which you want to see - // command results. + // * 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. // - // For example, specify AWS-RunPatchBaseline to see command executions that - // used this SSM document to perform security patching operations on instances. + // * ExecutionStage: Specify one of the following values: // + // Executing: Returns a list of command executions that are currently still + // running. // - // * ExecutionStage: An enum whose value can be either Executing or Complete. - // - // Specify Executing to see 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"` @@ -14015,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 @@ -14059,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")) } @@ -14093,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 @@ -14105,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 @@ -14141,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"` @@ -14148,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 @@ -14179,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")) } @@ -14213,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 @@ -14225,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 @@ -14281,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 @@ -14290,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. @@ -14316,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 @@ -14340,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 @@ -14347,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 @@ -14377,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"` @@ -14425,7 +14846,7 @@ 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. // @@ -16622,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 @@ -16659,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"` @@ -17048,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, @@ -17485,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) // @@ -18869,7 +19301,7 @@ type DescribePatchGroupStateOutput struct { InstancesWithInstalledPatches *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 + // 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, @@ -19161,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"` } @@ -19181,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 @@ -19191,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"` @@ -19214,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"` @@ -19243,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"` @@ -19251,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 @@ -19263,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 @@ -19359,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 @@ -19371,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"` @@ -19460,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 @@ -19526,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. @@ -19668,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 @@ -19710,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, @@ -20460,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 @@ -20503,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"` @@ -20520,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 @@ -20532,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 @@ -20562,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"` @@ -21080,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"` @@ -21238,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"` @@ -21391,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"` @@ -21588,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. // @@ -21632,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"` @@ -23095,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. // @@ -25719,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"` @@ -25885,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"` @@ -26056,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 @@ -26156,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"` } @@ -26261,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"` @@ -26307,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"` @@ -26387,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. // @@ -26430,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. @@ -26614,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 @@ -27483,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"` @@ -28287,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. // @@ -28398,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"` @@ -28986,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. // @@ -29147,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. @@ -29219,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. // @@ -29398,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"` } @@ -30831,6 +31469,13 @@ 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"` @@ -30871,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 { @@ -30933,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 @@ -31151,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"` @@ -31280,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 @@ -31535,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"` @@ -31615,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"` @@ -31651,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)) } @@ -31694,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 @@ -31926,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"` @@ -31945,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 @@ -31969,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 @@ -31976,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 @@ -32006,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"` @@ -32041,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"` @@ -32205,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"` @@ -32319,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 @@ -32444,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"` @@ -32512,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. // @@ -32582,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. // @@ -32750,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. // @@ -32790,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"` @@ -33292,6 +34147,23 @@ func (s *UpdatePatchBaselineOutput) SetSources(v []*PatchSource) *UpdatePatchBas 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" @@ -33359,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" @@ -33380,6 +34262,9 @@ const ( // AutomationExecutionFilterKeyStartTimeAfter is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyStartTimeAfter = "StartTimeAfter" + + // AutomationExecutionFilterKeyAutomationType is a AutomationExecutionFilterKey enum value + AutomationExecutionFilterKeyAutomationType = "AutomationType" ) const ( @@ -33408,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" @@ -33601,6 +34494,7 @@ const ( DocumentPermissionTypeShare = "Share" ) +// The status of a document. const ( // DocumentStatusCreating is a DocumentStatus enum value DocumentStatusCreating = "Creating" @@ -33613,6 +34507,9 @@ const ( // DocumentStatusDeleting is a DocumentStatus enum value DocumentStatusDeleting = "Deleting" + + // DocumentStatusFailed is a DocumentStatus enum value + DocumentStatusFailed = "Failed" ) const ( @@ -33627,6 +34524,9 @@ const ( // DocumentTypeSession is a DocumentType enum value DocumentTypeSession = "Session" + + // DocumentTypePackage is a DocumentType enum value + DocumentTypePackage = "Package" ) const ( 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 da7ff9e64..44d3bac89 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 8556f852a..67009dab5 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 @@ -11271,21 +11271,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"` } @@ -11311,6 +11326,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 @@ -11522,7 +11543,7 @@ type JoinDomainInput struct { // Active Directory domain. // // Password is a required field - Password *string `type:"string" required:"true"` + Password *string `type:"string" required:"true" sensitive:"true"` // Sets the user name of user who has permission to add the gateway to the Active // Directory domain. @@ -13377,7 +13398,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 @@ -13461,7 +13482,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 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 aba3cc730..97f9b8228 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 @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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/transfer/api.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/api.go new file mode 100644 index 000000000..de472a8a0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/transfer/api.go @@ -0,0 +1,3888 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package transfer + +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 opCreateServer = "CreateServer" + +// CreateServerRequest generates a "aws/request.Request" representing the +// client's request for the CreateServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateServer for more information on using the CreateServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateServerRequest method. +// req, resp := client.CreateServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer +func (c *Transfer) CreateServerRequest(input *CreateServerInput) (req *request.Request, output *CreateServerOutput) { + op := &request.Operation{ + Name: opCreateServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateServerInput{} + } + + output = &CreateServerOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateServer API operation for AWS Transfer for SFTP. +// +// Instantiates an autoscaling virtual server based on Secure File Transfer +// Protocol (SFTP) in AWS. The call returns the ServerId property assigned by +// the service to the newly created server. Reference this ServerId property +// when you make updates to your server, or work with users. +// +// The response returns the ServerId value for the newly created 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 AWS Transfer for SFTP's +// API operation CreateServer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer +func (c *Transfer) CreateServer(input *CreateServerInput) (*CreateServerOutput, error) { + req, out := c.CreateServerRequest(input) + return out, req.Send() +} + +// CreateServerWithContext is the same as CreateServer with the addition of +// the ability to pass a context and additional request options. +// +// See CreateServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) CreateServerWithContext(ctx aws.Context, input *CreateServerInput, opts ...request.Option) (*CreateServerOutput, error) { + req, out := c.CreateServerRequest(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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateUser for more information on using the CreateUser +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateUserRequest method. +// req, resp := client.CreateUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser +func (c *Transfer) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) { + op := &request.Operation{ + Name: opCreateUser, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateUserInput{} + } + + output = &CreateUserOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateUser API operation for AWS Transfer for SFTP. +// +// Adds a user and associate them with an existing Secure File Transfer Protocol +// (SFTP) server. Using parameters for CreateUser, you can specify the user +// name, set the home directory, store the user's public key, and assign the +// user's AWS Identity and Access Management (IAM) role. You can also optionally +// add a scope-down policy, and assign metadata with tags that can be used to +// group and search for users. +// +// The response returns the UserName and ServerId values of the new user for +// that 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 AWS Transfer for SFTP's +// API operation CreateUser for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// The requested resource does not exist. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser +func (c *Transfer) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) { + req, out := c.CreateUserRequest(input) + return out, req.Send() +} + +// CreateUserWithContext is the same as CreateUser with the addition of +// the ability to pass a context and additional request options. +// +// See CreateUser for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) { + req, out := c.CreateUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteServer = "DeleteServer" + +// DeleteServerRequest generates a "aws/request.Request" representing the +// client's request for the DeleteServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteServer for more information on using the DeleteServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteServerRequest method. +// req, resp := client.DeleteServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer +func (c *Transfer) DeleteServerRequest(input *DeleteServerInput) (req *request.Request, output *DeleteServerOutput) { + op := &request.Operation{ + Name: opDeleteServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteServerInput{} + } + + output = &DeleteServerOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteServer API operation for AWS Transfer for SFTP. +// +// Deletes the Secure File Transfer Protocol (SFTP) server that you specify. +// If you used SERVICE_MANAGED as your IdentityProviderType, you need to delete +// all users associated with this server before deleting the server itself +// +// No response returns from this 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 +// the error. +// +// See the AWS API reference guide for AWS Transfer for SFTP's +// API operation DeleteServer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer +func (c *Transfer) DeleteServer(input *DeleteServerInput) (*DeleteServerOutput, error) { + req, out := c.DeleteServerRequest(input) + return out, req.Send() +} + +// DeleteServerWithContext is the same as DeleteServer with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) DeleteServerWithContext(ctx aws.Context, input *DeleteServerInput, opts ...request.Option) (*DeleteServerOutput, error) { + req, out := c.DeleteServerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSshPublicKey for more information on using the DeleteSshPublicKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSshPublicKeyRequest method. +// req, resp := client.DeleteSshPublicKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey +func (c *Transfer) DeleteSshPublicKeyRequest(input *DeleteSshPublicKeyInput) (req *request.Request, output *DeleteSshPublicKeyOutput) { + op := &request.Operation{ + Name: opDeleteSshPublicKey, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSshPublicKeyInput{} + } + + output = &DeleteSshPublicKeyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteSshPublicKey API operation for AWS Transfer for SFTP. +// +// Deletes a user's Secure Shell (SSH) public key. +// +// No response is returned from this 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 +// the error. +// +// See the AWS API reference guide for AWS Transfer for SFTP's +// API operation DeleteSshPublicKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey +func (c *Transfer) DeleteSshPublicKey(input *DeleteSshPublicKeyInput) (*DeleteSshPublicKeyOutput, error) { + req, out := c.DeleteSshPublicKeyRequest(input) + return out, req.Send() +} + +// DeleteSshPublicKeyWithContext is the same as DeleteSshPublicKey with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSshPublicKey for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) DeleteSshPublicKeyWithContext(ctx aws.Context, input *DeleteSshPublicKeyInput, opts ...request.Option) (*DeleteSshPublicKeyOutput, error) { + req, out := c.DeleteSshPublicKeyRequest(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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteUser for more information on using the DeleteUser +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteUserRequest method. +// req, resp := client.DeleteUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser +func (c *Transfer) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { + op := &request.Operation{ + Name: opDeleteUser, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteUserInput{} + } + + output = &DeleteUserOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteUser API operation for AWS Transfer for SFTP. +// +// Deletes the user belonging to the server you specify. +// +// No response returns from this call. +// +// When you delete a user from a server, the user's information is lost. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 Transfer for SFTP's +// API operation DeleteUser for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser +func (c *Transfer) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { + req, out := c.DeleteUserRequest(input) + return out, req.Send() +} + +// DeleteUserWithContext is the same as DeleteUser with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteUser for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { + req, out := c.DeleteUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeServer = "DescribeServer" + +// DescribeServerRequest generates a "aws/request.Request" representing the +// client's request for the DescribeServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeServer for more information on using the DescribeServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeServerRequest method. +// req, resp := client.DescribeServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer +func (c *Transfer) DescribeServerRequest(input *DescribeServerInput) (req *request.Request, output *DescribeServerOutput) { + op := &request.Operation{ + Name: opDescribeServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeServerInput{} + } + + output = &DescribeServerOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeServer API operation for AWS Transfer for SFTP. +// +// Describes the server that you specify by passing the ServerId parameter. +// +// The response contains a description of the server's 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 AWS Transfer for SFTP's +// API operation DescribeServer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer +func (c *Transfer) DescribeServer(input *DescribeServerInput) (*DescribeServerOutput, error) { + req, out := c.DescribeServerRequest(input) + return out, req.Send() +} + +// DescribeServerWithContext is the same as DescribeServer with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) DescribeServerWithContext(ctx aws.Context, input *DescribeServerInput, opts ...request.Option) (*DescribeServerOutput, error) { + req, out := c.DescribeServerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeUser for more information on using the DescribeUser +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeUserRequest method. +// req, resp := client.DescribeUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser +func (c *Transfer) DescribeUserRequest(input *DescribeUserInput) (req *request.Request, output *DescribeUserOutput) { + op := &request.Operation{ + Name: opDescribeUser, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeUserInput{} + } + + output = &DescribeUserOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeUser API operation for AWS Transfer for SFTP. +// +// Describes the user assigned to a specific server, as identified by its ServerId +// property. +// +// The response from this call returns the properties of the user associated +// with the ServerId value that was 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 AWS Transfer for SFTP's +// API operation DescribeUser for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser +func (c *Transfer) DescribeUser(input *DescribeUserInput) (*DescribeUserOutput, error) { + req, out := c.DescribeUserRequest(input) + return out, req.Send() +} + +// DescribeUserWithContext is the same as DescribeUser with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeUser for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) DescribeUserWithContext(ctx aws.Context, input *DescribeUserInput, opts ...request.Option) (*DescribeUserOutput, error) { + req, out := c.DescribeUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opImportSshPublicKey = "ImportSshPublicKey" + +// ImportSshPublicKeyRequest generates a "aws/request.Request" representing the +// client's request for the ImportSshPublicKey operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ImportSshPublicKey for more information on using the ImportSshPublicKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ImportSshPublicKeyRequest method. +// req, resp := client.ImportSshPublicKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey +func (c *Transfer) ImportSshPublicKeyRequest(input *ImportSshPublicKeyInput) (req *request.Request, output *ImportSshPublicKeyOutput) { + op := &request.Operation{ + Name: opImportSshPublicKey, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportSshPublicKeyInput{} + } + + output = &ImportSshPublicKeyOutput{} + req = c.newRequest(op, input, output) + return +} + +// ImportSshPublicKey API operation for AWS Transfer for SFTP. +// +// Adds a Secure Shell (SSH) public key to a user account identified by a UserName +// value assigned to a specific server, identified by ServerId. +// +// The response returns the UserName value, the ServerId value, and the name +// of the SshPublicKeyId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 Transfer for SFTP's +// API operation ImportSshPublicKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// The requested resource does not exist. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey +func (c *Transfer) ImportSshPublicKey(input *ImportSshPublicKeyInput) (*ImportSshPublicKeyOutput, error) { + req, out := c.ImportSshPublicKeyRequest(input) + return out, req.Send() +} + +// ImportSshPublicKeyWithContext is the same as ImportSshPublicKey with the addition of +// the ability to pass a context and additional request options. +// +// See ImportSshPublicKey for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) ImportSshPublicKeyWithContext(ctx aws.Context, input *ImportSshPublicKeyInput, opts ...request.Option) (*ImportSshPublicKeyOutput, error) { + req, out := c.ImportSshPublicKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListServers = "ListServers" + +// ListServersRequest generates a "aws/request.Request" representing the +// client's request for the ListServers operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListServers for more information on using the ListServers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListServersRequest method. +// req, resp := client.ListServersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers +func (c *Transfer) ListServersRequest(input *ListServersInput) (req *request.Request, output *ListServersOutput) { + op := &request.Operation{ + Name: opListServers, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListServersInput{} + } + + output = &ListServersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListServers API operation for AWS Transfer for SFTP. +// +// Lists the Secure File Transfer Protocol (SFTP) servers that are associated +// with 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 Transfer for SFTP's +// API operation ListServers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The NextToken parameter that was passed is invalid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers +func (c *Transfer) ListServers(input *ListServersInput) (*ListServersOutput, error) { + req, out := c.ListServersRequest(input) + return out, req.Send() +} + +// ListServersWithContext is the same as ListServers with the addition of +// the ability to pass a context and additional request options. +// +// See ListServers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) ListServersWithContext(ctx aws.Context, input *ListServersInput, opts ...request.Option) (*ListServersOutput, error) { + req, out := c.ListServersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + 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) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource +func (c *Transfer) 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 Transfer for SFTP. +// +// Lists all of the tags associated with the Amazon Resource Number (ARN) you +// specify. The resource can be a user, server, or 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 +// the error. +// +// See the AWS API reference guide for AWS Transfer for SFTP's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The NextToken parameter that was passed is invalid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource +func (c *Transfer) 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 *Transfer) 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 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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListUsers for more information on using the ListUsers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListUsersRequest method. +// req, resp := client.ListUsersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers +func (c *Transfer) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) { + op := &request.Operation{ + Name: opListUsers, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListUsersInput{} + } + + output = &ListUsersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListUsers API operation for AWS Transfer for SFTP. +// +// Lists the users for the server that you specify by passing the ServerId 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 Transfer for SFTP's +// API operation ListUsers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The NextToken parameter that was passed is invalid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers +func (c *Transfer) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { + req, out := c.ListUsersRequest(input) + return out, req.Send() +} + +// ListUsersWithContext is the same as ListUsers with the addition of +// the ability to pass a context and additional request options. +// +// See ListUsers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) { + req, out := c.ListUsersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartServer = "StartServer" + +// StartServerRequest generates a "aws/request.Request" representing the +// client's request for the StartServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartServer for more information on using the StartServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartServerRequest method. +// req, resp := client.StartServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer +func (c *Transfer) StartServerRequest(input *StartServerInput) (req *request.Request, output *StartServerOutput) { + op := &request.Operation{ + Name: opStartServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartServerInput{} + } + + output = &StartServerOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StartServer API operation for AWS Transfer for SFTP. +// +// Changes the state of a Secure File Transfer Protocol (SFTP) server from OFFLINE +// to ONLINE. It has no impact on an SFTP server that is already ONLINE. An +// ONLINE server can accept and process file transfer jobs. +// +// The state of STARTING indicates that the server is in an intermediate state, +// either not fully able to respond, or not fully online. The values of START_FAILED +// can indicate an error condition. +// +// No response is returned from this 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 +// the error. +// +// See the AWS API reference guide for AWS Transfer for SFTP's +// API operation StartServer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer +func (c *Transfer) StartServer(input *StartServerInput) (*StartServerOutput, error) { + req, out := c.StartServerRequest(input) + return out, req.Send() +} + +// StartServerWithContext is the same as StartServer with the addition of +// the ability to pass a context and additional request options. +// +// See StartServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) StartServerWithContext(ctx aws.Context, input *StartServerInput, opts ...request.Option) (*StartServerOutput, error) { + req, out := c.StartServerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopServer = "StopServer" + +// StopServerRequest generates a "aws/request.Request" representing the +// client's request for the StopServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopServer for more information on using the StopServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopServerRequest method. +// req, resp := client.StopServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer +func (c *Transfer) StopServerRequest(input *StopServerInput) (req *request.Request, output *StopServerOutput) { + op := &request.Operation{ + Name: opStopServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopServerInput{} + } + + output = &StopServerOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopServer API operation for AWS Transfer for SFTP. +// +// Changes the state of an SFTP server from ONLINE to OFFLINE. An OFFLINE server +// cannot accept and process file transfer jobs. Information tied to your server +// such as server and user properties are not affected by stopping your server. +// Stopping a server will not reduce or impact your Secure File Transfer Protocol +// (SFTP) endpoint billing. +// +// The states of STOPPING indicates that the server is in an intermediate state, +// either not fully able to respond, or not fully offline. The values of STOP_FAILED +// can indicate an error condition. +// +// No response is returned from this 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 +// the error. +// +// See the AWS API reference guide for AWS Transfer for SFTP's +// API operation StopServer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer +func (c *Transfer) StopServer(input *StopServerInput) (*StopServerOutput, error) { + req, out := c.StopServerRequest(input) + return out, req.Send() +} + +// StopServerWithContext is the same as StopServer with the addition of +// the ability to pass a context and additional request options. +// +// See StopServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) StopServerWithContext(ctx aws.Context, input *StopServerInput, opts ...request.Option) (*StopServerOutput, error) { + req, out := c.StopServerRequest(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/transfer-2018-11-05/TagResource +func (c *Transfer) 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 Transfer for SFTP. +// +// Attaches a key-value pair to a resource, as identified by its Amazon Resource +// Name (ARN). Resources are users, servers, roles, and other entities. +// +// There is no response returned from this 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 +// the error. +// +// See the AWS API reference guide for AWS Transfer for SFTP's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource +func (c *Transfer) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + 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 *Transfer) 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 opTestIdentityProvider = "TestIdentityProvider" + +// TestIdentityProviderRequest generates a "aws/request.Request" representing the +// client's request for the TestIdentityProvider operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TestIdentityProvider for more information on using the TestIdentityProvider +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TestIdentityProviderRequest method. +// req, resp := client.TestIdentityProviderRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider +func (c *Transfer) TestIdentityProviderRequest(input *TestIdentityProviderInput) (req *request.Request, output *TestIdentityProviderOutput) { + op := &request.Operation{ + Name: opTestIdentityProvider, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TestIdentityProviderInput{} + } + + output = &TestIdentityProviderOutput{} + req = c.newRequest(op, input, output) + return +} + +// TestIdentityProvider API operation for AWS Transfer for SFTP. +// +// If the IdentityProviderType of the server is API_Gateway, tests whether your +// API Gateway is set up successfully. We highly recommend that you call this +// method to test your authentication method as soon as you create your server. +// By doing so, you can troubleshoot issues with the API Gateway integration +// to ensure that your users can successfully use the 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 Transfer for SFTP's +// API operation TestIdentityProvider for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider +func (c *Transfer) TestIdentityProvider(input *TestIdentityProviderInput) (*TestIdentityProviderOutput, error) { + req, out := c.TestIdentityProviderRequest(input) + return out, req.Send() +} + +// TestIdentityProviderWithContext is the same as TestIdentityProvider with the addition of +// the ability to pass a context and additional request options. +// +// See TestIdentityProvider for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) TestIdentityProviderWithContext(ctx aws.Context, input *TestIdentityProviderInput, opts ...request.Option) (*TestIdentityProviderOutput, error) { + req, out := c.TestIdentityProviderRequest(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/transfer-2018-11-05/UntagResource +func (c *Transfer) 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 Transfer for SFTP. +// +// Detaches a key-value pair from a resource, as identified by its Amazon Resource +// Name (ARN). Resources are users, servers, roles, and other entities. +// +// No response is returned from this 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 +// the error. +// +// See the AWS API reference guide for AWS Transfer for SFTP's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource +func (c *Transfer) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + 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 *Transfer) 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 opUpdateServer = "UpdateServer" + +// UpdateServerRequest generates a "aws/request.Request" representing the +// client's request for the UpdateServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateServer for more information on using the UpdateServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateServerRequest method. +// req, resp := client.UpdateServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer +func (c *Transfer) UpdateServerRequest(input *UpdateServerInput) (req *request.Request, output *UpdateServerOutput) { + op := &request.Operation{ + Name: opUpdateServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateServerInput{} + } + + output = &UpdateServerOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateServer API operation for AWS Transfer for SFTP. +// +// Updates the server properties after that server has been created. +// +// The UpdateServer call returns the ServerId of the Secure File Transfer Protocol +// (SFTP) server you updated. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 Transfer for SFTP's +// API operation UpdateServer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer +func (c *Transfer) UpdateServer(input *UpdateServerInput) (*UpdateServerOutput, error) { + req, out := c.UpdateServerRequest(input) + return out, req.Send() +} + +// UpdateServerWithContext is the same as UpdateServer with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) UpdateServerWithContext(ctx aws.Context, input *UpdateServerInput, opts ...request.Option) (*UpdateServerOutput, error) { + req, out := c.UpdateServerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateUser for more information on using the UpdateUser +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateUserRequest method. +// req, resp := client.UpdateUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser +func (c *Transfer) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, output *UpdateUserOutput) { + op := &request.Operation{ + Name: opUpdateUser, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateUserInput{} + } + + output = &UpdateUserOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateUser API operation for AWS Transfer for SFTP. +// +// Assigns new properties to a user. Parameters you pass modify any or all of +// the following: the home directory, role, and policy for the UserName and +// ServerId you specify. +// +// The response returns the ServerId and the UserName for the updated user. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Transfer for SFTP's +// API operation UpdateUser for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request has failed because the AWS Transfer for SFTP service is not available. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// service. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// This exception is thrown when the client submits a malformed request. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser +func (c *Transfer) UpdateUser(input *UpdateUserInput) (*UpdateUserOutput, error) { + req, out := c.UpdateUserRequest(input) + return out, req.Send() +} + +// UpdateUserWithContext is the same as UpdateUser with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateUser for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Transfer) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInput, opts ...request.Option) (*UpdateUserOutput, error) { + req, out := c.UpdateUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type CreateServerInput struct { + _ struct{} `type:"structure"` + + // An array containing all of the information required to call a customer-supplied + // authentication API. This parameter is not required when the IdentityProviderType + // value of server that is created uses the SERVICE_MANAGED authentication method. + IdentityProviderDetails *IdentityProviderDetails `type:"structure"` + + // The mode of authentication enabled for this service. The default value is + // SERVICE_MANAGED, which allows you to store and access SFTP user credentials + // within the service. An IdentityProviderType value of API_GATEWAY indicates + // that user authentication requires a call to an API Gateway endpoint URL provided + // by you to integrate an identity provider of your choice. + IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` + + // A value that allows the service to write your SFTP users’ activity to your + // Amazon CloudWatch logs for monitoring and auditing purposes. + LoggingRole *string `type:"string"` + + // Key-value pairs that can be used to group and search for servers. + Tags []*Tag `min:"1" type:"list"` +} + +// String returns the string representation +func (s CreateServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateServerInput"} + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 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 +} + +// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. +func (s *CreateServerInput) SetIdentityProviderDetails(v *IdentityProviderDetails) *CreateServerInput { + s.IdentityProviderDetails = v + return s +} + +// SetIdentityProviderType sets the IdentityProviderType field's value. +func (s *CreateServerInput) SetIdentityProviderType(v string) *CreateServerInput { + s.IdentityProviderType = &v + return s +} + +// SetLoggingRole sets the LoggingRole field's value. +func (s *CreateServerInput) SetLoggingRole(v string) *CreateServerInput { + s.LoggingRole = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateServerInput) SetTags(v []*Tag) *CreateServerInput { + s.Tags = v + return s +} + +type CreateServerOutput struct { + _ struct{} `type:"structure"` + + // The service-assigned ID of the SFTP server that is created. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateServerOutput) GoString() string { + return s.String() +} + +// SetServerId sets the ServerId field's value. +func (s *CreateServerOutput) SetServerId(v string) *CreateServerOutput { + s.ServerId = &v + return s +} + +type CreateUserInput struct { + _ struct{} `type:"structure"` + + // The landing directory (folder) for a user when they log in to the server + // using their SFTP client. An example is /home/username. + HomeDirectory *string `type:"string"` + + // A scope-down policy for your user so you can use the same IAM role across + // multiple users. This policy scopes down user access to portions of their + // Amazon S3 bucket. Variables you can use inside this policy include ${Transfer:UserName}, + // ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}. + Policy *string `type:"string"` + + // The IAM role that controls your user’s access to your Amazon S3 bucket. The + // policies attached to this role will determine the level of access you want + // to provide your users when transferring files into and out of your Amazon + // S3 bucket or buckets. The IAM role should also contain a trust relationship + // that allows the SFTP server to access your resources when servicing your + // SFTP user’s transfer requests. + // + // Role is a required field + Role *string `type:"string" required:"true"` + + // A system-assigned unique identifier for an SFTP server instance. This is + // the specific SFTP server that you added your user to. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // The public portion of the Secure Shall (SSH) key used to authenticate the + // user to the SFTP server. + SshPublicKeyBody *string `type:"string"` + + // Key-value pairs that can be used to group and search for users. Tags are + // metadata attached to users for any purpose. + Tags []*Tag `min:"1" type:"list"` + + // A unique string that identifies a user and is associated with a server as + // specified by the ServerId. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateUserInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} + if s.Role == nil { + invalidParams.Add(request.NewErrParamRequired("Role")) + } + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.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 +} + +// SetHomeDirectory sets the HomeDirectory field's value. +func (s *CreateUserInput) SetHomeDirectory(v string) *CreateUserInput { + s.HomeDirectory = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *CreateUserInput) SetPolicy(v string) *CreateUserInput { + s.Policy = &v + return s +} + +// SetRole sets the Role field's value. +func (s *CreateUserInput) SetRole(v string) *CreateUserInput { + s.Role = &v + return s +} + +// SetServerId sets the ServerId field's value. +func (s *CreateUserInput) SetServerId(v string) *CreateUserInput { + s.ServerId = &v + return s +} + +// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. +func (s *CreateUserInput) SetSshPublicKeyBody(v string) *CreateUserInput { + s.SshPublicKeyBody = &v + 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 + return s +} + +type CreateUserOutput struct { + _ struct{} `type:"structure"` + + // The ID of the SFTP server that the user is attached to. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // A unique string that identifies a user account associated with an SFTP server. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateUserOutput) GoString() string { + return s.String() +} + +// SetServerId sets the ServerId field's value. +func (s *CreateUserOutput) SetServerId(v string) *CreateUserOutput { + s.ServerId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *CreateUserOutput) SetUserName(v string) *CreateUserOutput { + s.UserName = &v + return s +} + +type DeleteServerInput struct { + _ struct{} `type:"structure"` + + // A unique system-assigned identifier for an SFTP server instance. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteServerInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *DeleteServerInput) SetServerId(v string) *DeleteServerInput { + s.ServerId = &v + return s +} + +type DeleteServerOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServerOutput) GoString() string { + return s.String() +} + +type DeleteSshPublicKeyInput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP) + // server instance that has the user assigned to it. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // A unique identifier used to reference your user’s specific SSH key. + // + // SshPublicKeyId is a required field + SshPublicKeyId *string `type:"string" required:"true"` + + // A unique string that identifies a user whose public key is being deleted. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSshPublicKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSshPublicKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSshPublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSshPublicKeyInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + if s.SshPublicKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("SshPublicKeyId")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *DeleteSshPublicKeyInput) SetServerId(v string) *DeleteSshPublicKeyInput { + s.ServerId = &v + return s +} + +// SetSshPublicKeyId sets the SshPublicKeyId field's value. +func (s *DeleteSshPublicKeyInput) SetSshPublicKeyId(v string) *DeleteSshPublicKeyInput { + s.SshPublicKeyId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *DeleteSshPublicKeyInput) SetUserName(v string) *DeleteSshPublicKeyInput { + s.UserName = &v + return s +} + +type DeleteSshPublicKeyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteSshPublicKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSshPublicKeyOutput) GoString() string { + return s.String() +} + +type DeleteUserInput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server instance that has + // the user assigned to it. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // A unique string that identifies a user that is being deleted from the server. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *DeleteUserInput) SetServerId(v string) *DeleteUserInput { + s.ServerId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *DeleteUserInput) SetUserName(v string) *DeleteUserInput { + s.UserName = &v + return s +} + +type DeleteUserOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserOutput) GoString() string { + return s.String() +} + +type DescribeServerInput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeServerInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *DescribeServerInput) SetServerId(v string) *DescribeServerInput { + s.ServerId = &v + return s +} + +type DescribeServerOutput struct { + _ struct{} `type:"structure"` + + // An array containing the properties of the server with the ServerID you specified. + // + // Server is a required field + Server *DescribedServer `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServerOutput) GoString() string { + return s.String() +} + +// SetServer sets the Server field's value. +func (s *DescribeServerOutput) SetServer(v *DescribedServer) *DescribeServerOutput { + s.Server = v + return s +} + +type DescribeUserInput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server that has this user + // assigned. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // The name of the user assigned to one or more servers. User names are part + // of the sign-in credentials to use the AWS Transfer service and perform file + // transfer tasks. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUserInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeUserInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *DescribeUserInput) SetServerId(v string) *DescribeUserInput { + s.ServerId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *DescribeUserInput) SetUserName(v string) *DescribeUserInput { + s.UserName = &v + return s +} + +type DescribeUserOutput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server that has this user + // assigned. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // An array containing the properties of the user account for the ServerID value + // that you specified. + // + // User is a required field + User *DescribedUser `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUserOutput) GoString() string { + return s.String() +} + +// SetServerId sets the ServerId field's value. +func (s *DescribeUserOutput) SetServerId(v string) *DescribeUserOutput { + s.ServerId = &v + return s +} + +// SetUser sets the User field's value. +func (s *DescribeUserOutput) SetUser(v *DescribedUser) *DescribeUserOutput { + s.User = v + return s +} + +// Describe the properties of the server that was specified. Information returned +// includes: the server Amazon Resource Name (ARN), the authentication configuration +// and type, the logging role, server Id and state, and assigned tags or metadata. +type DescribedServer struct { + _ struct{} `type:"structure"` + + // Specifies the unique Amazon Resource Name (ARN) for the server to be described. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + // Specifies information to call a customer-supplied authentication API. This + // field is not populated when the IdentityProviderType of the server is SERVICE_MANAGED>. + IdentityProviderDetails *IdentityProviderDetails `type:"structure"` + + // This property defines the mode of authentication method enabled for this + // service. A value of SERVICE_MANAGED, means that you are using this Server + // to store and access SFTP user credentials within the service. A value of + // API_GATEWAY indicates that you have integrated an API Gateway endpoint that + // will be invoked for authenticating your user into the service. + IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` + + // This property is an AWS Identity and Access Management (IAM) entity that + // allows the server to turn on Amazon CloudWatch logging for Amazon S3 events. + // When set, user activity can be view in your CloudWatch logs. + LoggingRole *string `type:"string"` + + // This property is a unique system assigned identifier for the SFTP server + // that you instantiate. + ServerId *string `type:"string"` + + // The condition of the SFTP server for the server that was described. A value + // of ONLINE indicates that the server can accept jobs and transfer files. A + // State value of OFFLINE means that the server cannot perform file transfer + // operations. + // + // The states of STARTING and STOPPING indicated that the server is in an intermediate + // state, either not fully able to respond, or not fully offline. The values + // of START_FAILED or STOP_FAILED can indicate an error condition. + State *string `type:"string" enum:"State"` + + // This property contains the key-value pairs that you can use to search for + // and group servers that were assigned to the server that was described. + Tags []*Tag `min:"1" type:"list"` + + // The number of users that are assigned to the SFTP server you specified with + // the ServerId. + UserCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribedServer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribedServer) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribedServer) SetArn(v string) *DescribedServer { + s.Arn = &v + return s +} + +// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. +func (s *DescribedServer) SetIdentityProviderDetails(v *IdentityProviderDetails) *DescribedServer { + s.IdentityProviderDetails = v + return s +} + +// SetIdentityProviderType sets the IdentityProviderType field's value. +func (s *DescribedServer) SetIdentityProviderType(v string) *DescribedServer { + s.IdentityProviderType = &v + return s +} + +// SetLoggingRole sets the LoggingRole field's value. +func (s *DescribedServer) SetLoggingRole(v string) *DescribedServer { + s.LoggingRole = &v + return s +} + +// SetServerId sets the ServerId field's value. +func (s *DescribedServer) SetServerId(v string) *DescribedServer { + s.ServerId = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribedServer) SetState(v string) *DescribedServer { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *DescribedServer) SetTags(v []*Tag) *DescribedServer { + s.Tags = v + return s +} + +// SetUserCount sets the UserCount field's value. +func (s *DescribedServer) SetUserCount(v int64) *DescribedServer { + s.UserCount = &v + return s +} + +// Returns properties of the user that you wish to describe. +type DescribedUser struct { + _ struct{} `type:"structure"` + + // This property contains the unique Amazon Resource Name (ARN) for the user + // that was requested to be described. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + // This property specifies the landing directory (or folder) which is the location + // that files are written to or read from in an Amazon S3 bucket for the described + // user. An example would be: /bucket_name/home/username. + HomeDirectory *string `type:"string"` + + // Specifies the name of the policy in use for the described user. + Policy *string `type:"string"` + + // This property specifies the IAM role that controls your user’s access to + // your Amazon S3 bucket. The policies attached to this role will determine + // the level of access you want to provide your users when transferring files + // into and out of your Amazon S3 bucket or buckets. The IAM role should also + // contain a trust relationship that allows the SFTP server to access your resources + // when servicing your SFTP user’s transfer requests. + Role *string `type:"string"` + + // This property contains the public key portion of the Secure Shell (SSH) keys + // stored for the described user. + SshPublicKeys []*SshPublicKey `type:"list"` + + // This property contains the key-value pairs for the user requested. Tag can + // be used to search for and group users for a variety of purposes. + Tags []*Tag `min:"1" type:"list"` + + // This property is the name of the user that was requested to be described. + // User names are used for authentication purposes. This is the string that + // will be used by your user when they log in to your SFTP server. + UserName *string `type:"string"` +} + +// String returns the string representation +func (s DescribedUser) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribedUser) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribedUser) SetArn(v string) *DescribedUser { + s.Arn = &v + return s +} + +// SetHomeDirectory sets the HomeDirectory field's value. +func (s *DescribedUser) SetHomeDirectory(v string) *DescribedUser { + s.HomeDirectory = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *DescribedUser) SetPolicy(v string) *DescribedUser { + s.Policy = &v + return s +} + +// SetRole sets the Role field's value. +func (s *DescribedUser) SetRole(v string) *DescribedUser { + s.Role = &v + return s +} + +// SetSshPublicKeys sets the SshPublicKeys field's value. +func (s *DescribedUser) SetSshPublicKeys(v []*SshPublicKey) *DescribedUser { + s.SshPublicKeys = v + return s +} + +// SetTags sets the Tags field's value. +func (s *DescribedUser) SetTags(v []*Tag) *DescribedUser { + s.Tags = v + return s +} + +// SetUserName sets the UserName field's value. +func (s *DescribedUser) SetUserName(v string) *DescribedUser { + s.UserName = &v + return s +} + +// Returns information related to the type of user authentication that is in +// use for a server's users. A server can only have one method of authentication. +type IdentityProviderDetails struct { + _ struct{} `type:"structure"` + + // The Role parameter provides the type of InvocationRole used to authenticate + // the user account. + InvocationRole *string `type:"string"` + + // The IdentityProviderDetail parameter contains the location of the service + // endpoint used to authenticate users. + Url *string `type:"string"` +} + +// String returns the string representation +func (s IdentityProviderDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IdentityProviderDetails) GoString() string { + return s.String() +} + +// SetInvocationRole sets the InvocationRole field's value. +func (s *IdentityProviderDetails) SetInvocationRole(v string) *IdentityProviderDetails { + s.InvocationRole = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *IdentityProviderDetails) SetUrl(v string) *IdentityProviderDetails { + s.Url = &v + return s +} + +type ImportSshPublicKeyInput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // The public key portion of an SSH key pair. + // + // SshPublicKeyBody is a required field + SshPublicKeyBody *string `type:"string" required:"true"` + + // The name of the user account that is assigned to one or more servers. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ImportSshPublicKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportSshPublicKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportSshPublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportSshPublicKeyInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + if s.SshPublicKeyBody == nil { + invalidParams.Add(request.NewErrParamRequired("SshPublicKeyBody")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *ImportSshPublicKeyInput) SetServerId(v string) *ImportSshPublicKeyInput { + s.ServerId = &v + return s +} + +// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. +func (s *ImportSshPublicKeyInput) SetSshPublicKeyBody(v string) *ImportSshPublicKeyInput { + s.SshPublicKeyBody = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *ImportSshPublicKeyInput) SetUserName(v string) *ImportSshPublicKeyInput { + s.UserName = &v + return s +} + +// This response identifies the user, server they belong to, and the identifier +// of the SSH public key associated with that user. A user can have more than +// one key on each server that they are associate with. +type ImportSshPublicKeyOutput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // This identifier is the name given to a public key by the system that was + // imported. + // + // SshPublicKeyId is a required field + SshPublicKeyId *string `type:"string" required:"true"` + + // A user name assigned to the ServerID value that you specified. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ImportSshPublicKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportSshPublicKeyOutput) GoString() string { + return s.String() +} + +// SetServerId sets the ServerId field's value. +func (s *ImportSshPublicKeyOutput) SetServerId(v string) *ImportSshPublicKeyOutput { + s.ServerId = &v + return s +} + +// SetSshPublicKeyId sets the SshPublicKeyId field's value. +func (s *ImportSshPublicKeyOutput) SetSshPublicKeyId(v string) *ImportSshPublicKeyOutput { + s.SshPublicKeyId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *ImportSshPublicKeyOutput) SetUserName(v string) *ImportSshPublicKeyOutput { + s.UserName = &v + return s +} + +type ListServersInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of servers to return as a response to the ListServers + // query. + MaxResults *int64 `min:"1" type:"integer"` + + // When additional results are obtained from the ListServers command, a NextToken + // parameter is returned in the output. You can then pass the NextToken parameter + // in a subsequent command to continue listing additional servers. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListServersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListServersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListServersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListServersInput"} + 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 *ListServersInput) SetMaxResults(v int64) *ListServersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListServersInput) SetNextToken(v string) *ListServersInput { + s.NextToken = &v + return s +} + +type ListServersOutput struct { + _ struct{} `type:"structure"` + + // When you can get additional results from the ListServers operation, a NextToken + // parameter is returned in the output. In a following command, you can pass + // in the NextToken parameter to continue listing additional servers. + NextToken *string `min:"1" type:"string"` + + // An array of servers that were listed. + // + // Servers is a required field + Servers []*ListedServer `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListServersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListServersOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListServersOutput) SetNextToken(v string) *ListServersOutput { + s.NextToken = &v + return s +} + +// SetServers sets the Servers field's value. +func (s *ListServersOutput) SetServers(v []*ListedServer) *ListServersOutput { + s.Servers = v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // Requests the tags associated with a particular Amazon Resource Name (ARN). + // An ARN is an identifier for a specific AWS resource, such as a server, user, + // or role. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + MaxResults *int64 `min:"1" type:"integer"` + + NextToken *string `min:"1" type:"string"` +} + +// 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.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) + } + 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 +} + +// SetArn sets the Arn field's value. +func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput { + s.Arn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { + s.NextToken = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // This value is the ARN you specified to list the tags of. + Arn *string `min:"20" type:"string"` + + NextToken *string `min:"1" type:"string"` + + // Key-value pairs that are assigned to a resource, usually for the purpose + // of grouping and searching for items. Tags are metadata that you define that + // you can use for any purpose. + Tags []*Tag `min:"1" 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() +} + +// SetArn sets the Arn field's value. +func (s *ListTagsForResourceOutput) SetArn(v string) *ListTagsForResourceOutput { + s.Arn = &v + return s +} + +// 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 ListUsersInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of users to return as a response to the ListUsers request. + MaxResults *int64 `min:"1" type:"integer"` + + // When you can get additional results from the ListUsersListUsers call, a NextToken + // parameter is returned in the output. You can then pass in a subsequent command + // the NextToken parameter to continue listing additional users. + NextToken *string `min:"1" type:"string"` + + // A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP) + // server that has users are assigned to it. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListUsersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListUsersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListUsersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} + 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 s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListUsersInput) SetMaxResults(v int64) *ListUsersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListUsersInput) SetNextToken(v string) *ListUsersInput { + s.NextToken = &v + return s +} + +// SetServerId sets the ServerId field's value. +func (s *ListUsersInput) SetServerId(v string) *ListUsersInput { + s.ServerId = &v + return s +} + +type ListUsersOutput struct { + _ struct{} `type:"structure"` + + // When you can get additional results from the ListUsers call, a NextToken + // parameter is returned in the output. You can then pass in a subsequent command + // the NextToken parameter to continue listing additional users. + NextToken *string `min:"1" type:"string"` + + // A system-assigned unique identifier for an SFTP server that the users are + // assigned to. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // Returns the user accounts and their properties for the ServerId value that + // you specify. + // + // Users is a required field + Users []*ListedUser `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListUsersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListUsersOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListUsersOutput) SetNextToken(v string) *ListUsersOutput { + s.NextToken = &v + return s +} + +// SetServerId sets the ServerId field's value. +func (s *ListUsersOutput) SetServerId(v string) *ListUsersOutput { + s.ServerId = &v + return s +} + +// SetUsers sets the Users field's value. +func (s *ListUsersOutput) SetUsers(v []*ListedUser) *ListUsersOutput { + s.Users = v + return s +} + +// Returns properties of the server that was specified. +type ListedServer struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name (ARN) for the server to be listed. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + // The authentication method used to validate a user for the server that was + // specified. listed. This can include Secure Shell (SSH), user name and password + // combinations, or your own custom authentication method. Valid values include + // SERVICE_MANAGED or API_GATEWAY. + IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` + + // The AWS Identity and Access Management entity that allows the server to turn + // on Amazon CloudWatch logging. + LoggingRole *string `type:"string"` + + // This value is the unique system assigned identifier for the SFTP servers + // that were listed. + ServerId *string `type:"string"` + + // This property describes the condition of the SFTP server for the server that + // was described. A value of ONLINE> indicates that the server can accept jobs + // and transfer files. A State value of OFFLINE means that the server cannot + // perform file transfer operations. + // + // The states of STARTING and STOPPING indicated that the server is in an intermediate + // state, either not fully able to respond, or not fully offline. The values + // of START_FAILED or STOP_FAILED can indicate an error condition. + State *string `type:"string" enum:"State"` + + // This property is a numeric value that indicates the number of users that + // are assigned to the SFTP server you specified with the ServerId. + UserCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s ListedServer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListedServer) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ListedServer) SetArn(v string) *ListedServer { + s.Arn = &v + return s +} + +// SetIdentityProviderType sets the IdentityProviderType field's value. +func (s *ListedServer) SetIdentityProviderType(v string) *ListedServer { + s.IdentityProviderType = &v + return s +} + +// SetLoggingRole sets the LoggingRole field's value. +func (s *ListedServer) SetLoggingRole(v string) *ListedServer { + s.LoggingRole = &v + return s +} + +// SetServerId sets the ServerId field's value. +func (s *ListedServer) SetServerId(v string) *ListedServer { + s.ServerId = &v + return s +} + +// SetState sets the State field's value. +func (s *ListedServer) SetState(v string) *ListedServer { + s.State = &v + return s +} + +// SetUserCount sets the UserCount field's value. +func (s *ListedServer) SetUserCount(v int64) *ListedServer { + s.UserCount = &v + return s +} + +// Returns properties of the user that you specify. +type ListedUser struct { + _ struct{} `type:"structure"` + + // This property is the unique Amazon Resource Name (ARN) for the user that + // you wish to learn about. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + // This value specifies the location that files are written to or read from + // an Amazon S3 bucket for the user you specify by their ARN. + HomeDirectory *string `type:"string"` + + // The role in use by this user. A role is an AWS Identity and Access Management + // (IAM) entity that in this case allows the SFTP server to act on a user's + // behalf. It allows the server to inherit the trust relationship that enables + // that user to perform file operations to their Amazon S3 bucket. + Role *string `type:"string"` + + // This value is the number of SSH public keys stored for the user you specified. + SshPublicKeyCount *int64 `type:"integer"` + + // The name of the user whose ARN was specified. User names are used for authentication + // purposes. + UserName *string `type:"string"` +} + +// String returns the string representation +func (s ListedUser) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListedUser) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ListedUser) SetArn(v string) *ListedUser { + s.Arn = &v + return s +} + +// SetHomeDirectory sets the HomeDirectory field's value. +func (s *ListedUser) SetHomeDirectory(v string) *ListedUser { + s.HomeDirectory = &v + return s +} + +// SetRole sets the Role field's value. +func (s *ListedUser) SetRole(v string) *ListedUser { + s.Role = &v + return s +} + +// SetSshPublicKeyCount sets the SshPublicKeyCount field's value. +func (s *ListedUser) SetSshPublicKeyCount(v int64) *ListedUser { + s.SshPublicKeyCount = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *ListedUser) SetUserName(v string) *ListedUser { + s.UserName = &v + return s +} + +// Provides information about the public Secure Shell (SSH) key that is associated +// with a user account for a specific server (as identified by ServerId). The +// information returned includes the date the key was imported, the public key +// contents, and the public key ID. A user can store more than one SSH public +// key associated with their user name on a specific SFTP server. +type SshPublicKey struct { + _ struct{} `type:"structure"` + + // The date that the public key was added to the user account. + // + // DateImported is a required field + DateImported *time.Time `type:"timestamp" required:"true"` + + // The content of the SSH public key as specified by the PublicKeyId. + // + // SshPublicKeyBody is a required field + SshPublicKeyBody *string `type:"string" required:"true"` + + // The SshPublicKeyId parameter contains the identifier of the public key. + // + // SshPublicKeyId is a required field + SshPublicKeyId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s SshPublicKey) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SshPublicKey) GoString() string { + return s.String() +} + +// SetDateImported sets the DateImported field's value. +func (s *SshPublicKey) SetDateImported(v time.Time) *SshPublicKey { + s.DateImported = &v + return s +} + +// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. +func (s *SshPublicKey) SetSshPublicKeyBody(v string) *SshPublicKey { + s.SshPublicKeyBody = &v + return s +} + +// SetSshPublicKeyId sets the SshPublicKeyId field's value. +func (s *SshPublicKey) SetSshPublicKeyId(v string) *SshPublicKey { + s.SshPublicKeyId = &v + return s +} + +type StartServerInput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server that you start. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartServerInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *StartServerInput) SetServerId(v string) *StartServerInput { + s.ServerId = &v + return s +} + +type StartServerOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartServerOutput) GoString() string { + return s.String() +} + +type StopServerInput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server that you stopped. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StopServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopServerInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *StopServerInput) SetServerId(v string) *StopServerInput { + s.ServerId = &v + return s +} + +type StopServerOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopServerOutput) GoString() string { + return s.String() +} + +// Creates a key-value pair for a specific resource. Tags are metadata that +// you can use to search for and group a resource for various purposes. You +// can apply tags to servers, users, and roles. A tag key can take more than +// one value. For example, to group servers for accounting purposes, you might +// create a tag called Group and assign the values Research and Accounting to +// that group. +type Tag struct { + _ struct{} `type:"structure"` + + // The name assigned to the tag that you create. + // + // Key is a required field + Key *string `type:"string" required:"true"` + + // This property contains one or more values that you assigned to the key name + // you create. + // + // 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 TagResourceInput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) for a specific AWS resource, such as a server, + // user, or role. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + // Key-value pairs assigned to ARNs that you can use to group and search for + // resources by type. You can attach this metadata to user accounts for any + // purpose. + // + // Tags is a required field + Tags []*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.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 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 +} + +// SetArn sets the Arn field's value. +func (s *TagResourceInput) SetArn(v string) *TagResourceInput { + s.Arn = &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 TestIdentityProviderInput struct { + _ struct{} `type:"structure"` + + // A system assigned identifier for a specific server. That server's user authentication + // method is tested with a user name and password. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // This request parameter is name of the user account to be tested. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` + + // The password of the user account to be tested. + UserPassword *string `type:"string"` +} + +// String returns the string representation +func (s TestIdentityProviderInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestIdentityProviderInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestIdentityProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestIdentityProviderInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServerId sets the ServerId field's value. +func (s *TestIdentityProviderInput) SetServerId(v string) *TestIdentityProviderInput { + s.ServerId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *TestIdentityProviderInput) SetUserName(v string) *TestIdentityProviderInput { + s.UserName = &v + return s +} + +// SetUserPassword sets the UserPassword field's value. +func (s *TestIdentityProviderInput) SetUserPassword(v string) *TestIdentityProviderInput { + s.UserPassword = &v + return s +} + +type TestIdentityProviderOutput struct { + _ struct{} `type:"structure"` + + // The result of the authorization test as a message. + Message *string `type:"string"` + + // The HTTP status code that is the response from your API Gateway. + // + // StatusCode is a required field + StatusCode *int64 `type:"integer" required:"true"` + + // The endpoint of the service used to authenticate a user. + // + // Url is a required field + Url *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TestIdentityProviderOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestIdentityProviderOutput) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *TestIdentityProviderOutput) SetMessage(v string) *TestIdentityProviderOutput { + s.Message = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *TestIdentityProviderOutput) SetStatusCode(v int64) *TestIdentityProviderOutput { + s.StatusCode = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *TestIdentityProviderOutput) SetUrl(v string) *TestIdentityProviderOutput { + s.Url = &v + return s +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // This is the value of the resource that will have the tag removed. An Amazon + // Resource Name (ARN) is an identifier for a specific AWS resource, such as + // a server, user, or role. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + // TagKeys are key-value pairs assigned to ARNs that can be used to group and + // search for resources by type. This metadata can be attached to resources + // for any purpose. + // + // TagKeys is a required field + TagKeys []*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.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + if s.TagKeys != nil && len(s.TagKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput { + s.Arn = &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 UpdateServerInput struct { + _ struct{} `type:"structure"` + + // This response parameter is an array containing all of the information required + // to call a customer's authentication API method. + IdentityProviderDetails *IdentityProviderDetails `type:"structure"` + + // Changes the AWS Identity and Access Management (IAM) role that allows Amazon + // S3 events to be logged in Amazon CloudWatch, turning logging on or off. + LoggingRole *string `type:"string"` + + // A system-assigned unique identifier for an SFTP server instance that the + // user account is assigned to. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateServerInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. +func (s *UpdateServerInput) SetIdentityProviderDetails(v *IdentityProviderDetails) *UpdateServerInput { + s.IdentityProviderDetails = v + return s +} + +// SetLoggingRole sets the LoggingRole field's value. +func (s *UpdateServerInput) SetLoggingRole(v string) *UpdateServerInput { + s.LoggingRole = &v + return s +} + +// SetServerId sets the ServerId field's value. +func (s *UpdateServerInput) SetServerId(v string) *UpdateServerInput { + s.ServerId = &v + return s +} + +type UpdateServerOutput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server that the user account + // is assigned to. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServerOutput) GoString() string { + return s.String() +} + +// SetServerId sets the ServerId field's value. +func (s *UpdateServerOutput) SetServerId(v string) *UpdateServerOutput { + s.ServerId = &v + return s +} + +type UpdateUserInput struct { + _ struct{} `type:"structure"` + + // The HomeDirectory parameter specifies the landing directory (folder) for + // a user when they log in to the server using their client. An example would + // be: /home/username. + HomeDirectory *string `type:"string"` + + // Allows you to supply a scope-down policy for your user so you can use the + // same AWS Identity and Access Management (IAM) role across multiple users. + // The policy scopes down users access to portions of your Amazon S3 bucket. + // Variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, + // and ${Transfer:HomeBucket}. + Policy *string `type:"string"` + + // The IAM role that controls your user’s access to your Amazon S3 bucket. The + // policies attached to this role will determine the level of access you want + // to provide your users when transferring files into and out of your Amazon + // S3 bucket or buckets. The IAM role should also contain a trust relationship + // that allows the Secure File Transfer Protocol (SFTP) server to access your + // resources when servicing your SFTP user’s transfer requests. + Role *string `type:"string"` + + // A system-assigned unique identifier for an SFTP server instance that the + // user account is assigned to. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // A unique string that identifies a user and is associated with a server as + // specified by the ServerId. This is the string that will be used by your user + // when they log in to your SFTP server. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateUserInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"} + if s.ServerId == nil { + invalidParams.Add(request.NewErrParamRequired("ServerId")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHomeDirectory sets the HomeDirectory field's value. +func (s *UpdateUserInput) SetHomeDirectory(v string) *UpdateUserInput { + s.HomeDirectory = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *UpdateUserInput) SetPolicy(v string) *UpdateUserInput { + s.Policy = &v + return s +} + +// SetRole sets the Role field's value. +func (s *UpdateUserInput) SetRole(v string) *UpdateUserInput { + s.Role = &v + return s +} + +// SetServerId sets the ServerId field's value. +func (s *UpdateUserInput) SetServerId(v string) *UpdateUserInput { + s.ServerId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *UpdateUserInput) SetUserName(v string) *UpdateUserInput { + s.UserName = &v + return s +} + +// UpdateUserResponse returns the user name and server identifier for the request +// to update a user's properties. +type UpdateUserOutput struct { + _ struct{} `type:"structure"` + + // A system-assigned unique identifier for an SFTP server instance that the + // user account is assigned to. + // + // ServerId is a required field + ServerId *string `type:"string" required:"true"` + + // The unique identifier for a user that is assigned to the SFTP server instance + // that was specified in the request. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateUserOutput) GoString() string { + return s.String() +} + +// SetServerId sets the ServerId field's value. +func (s *UpdateUserOutput) SetServerId(v string) *UpdateUserOutput { + s.ServerId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *UpdateUserOutput) SetUserName(v string) *UpdateUserOutput { + s.UserName = &v + return s +} + +// Returns information related to the type of user authentication that is in +// use for a server's users. For SERVICE_MANAGED authentication, the Secure +// Shell (SSH) public keys are stored with a user on an SFTP server instance. +// For API_GATEWAY authentication, your custom authentication method is implemented +// by using an API call. A server can only have one method of authentication. +const ( + // IdentityProviderTypeServiceManaged is a IdentityProviderType enum value + IdentityProviderTypeServiceManaged = "SERVICE_MANAGED" + + // IdentityProviderTypeApiGateway is a IdentityProviderType enum value + IdentityProviderTypeApiGateway = "API_GATEWAY" +) + +// Describes the condition of the SFTP server with respect to its ability to +// perform file operations. There are six possible states: OFFLINE, ONLINE, +// STARTING, STOPPING, START_FAILED, and STOP_FAILED. +// +// OFFLINE indicates that the SFTP server exists, but that it is not available +// for file operations. ONLINE indicates that the SFTP server is available to +// perform file operations. STARTING indicates that the SFTP server's was instantiated, +// but the server is not yet available to perform file operations. Under normal +// conditions, it can take a couple of minutes for an SFTP server to be completely +// operational. Both START_FAILED and STOP_FAILED are error conditions. +const ( + // StateOffline is a State enum value + StateOffline = "OFFLINE" + + // StateOnline is a State enum value + StateOnline = "ONLINE" + + // StateStarting is a State enum value + StateStarting = "STARTING" + + // StateStopping is a State enum value + StateStopping = "STOPPING" + + // StateStartFailed is a State enum value + StateStartFailed = "START_FAILED" + + // StateStopFailed is a State enum value + StateStopFailed = "STOP_FAILED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go new file mode 100644 index 000000000..8bdc2fd1c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go @@ -0,0 +1,26 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package transfer provides the client and types for making API +// requests to AWS Transfer for SFTP. +// +// See https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05 for more information on this service. +// +// See transfer package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/transfer/ +// +// Using the Client +// +// To contact AWS Transfer for SFTP 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 Transfer for SFTP client Transfer for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/transfer/#New +package transfer diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go new file mode 100644 index 000000000..0734c873b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go @@ -0,0 +1,44 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package transfer + +const ( + + // ErrCodeInternalServiceError for service response error code + // "InternalServiceError". + // + // This exception is thrown when an error occurs in the AWS Transfer for SFTP + // service. + ErrCodeInternalServiceError = "InternalServiceError" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The NextToken parameter that was passed is invalid. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // This exception is thrown when the client submits a malformed request. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeResourceExistsException for service response error code + // "ResourceExistsException". + // + // The requested resource does not exist. + ErrCodeResourceExistsException = "ResourceExistsException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // This exception is thrown when a resource is not found by the AWS Transfer + // for SFTP service. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + // + // The request has failed because the AWS Transfer for SFTP service is not available. + ErrCodeServiceUnavailableException = "ServiceUnavailableException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go new file mode 100644 index 000000000..0fcea8665 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package transfer + +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" +) + +// Transfer provides the API operation methods for making requests to +// AWS Transfer for SFTP. See this package's package overview docs +// for details on the service. +// +// Transfer methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Transfer 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 = "Transfer" // Name of service. + EndpointsID = "transfer" // ID to lookup a service endpoint with. + ServiceID = "Transfer" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Transfer 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 Transfer client from just a session. +// svc := transfer.New(mySession) +// +// // Create a Transfer client with additional configuration +// svc := transfer.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Transfer { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "transfer" + } + 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) *Transfer { + svc := &Transfer{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-11-05", + JSONVersion: "1.1", + TargetPrefix: "TransferService", + }, + 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 Transfer operation and runs any +// custom request initialization. +func (c *Transfer) 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/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index 56c16743c..3cf5c8c30 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" @@ -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 } @@ -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 } @@ -6472,6 +6476,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 } 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 bce6f2cc8..a83af96aa 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" ) @@ -48,6 +50,7 @@ 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 } @@ -2251,6 +2254,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 } @@ -2338,6 +2342,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 } @@ -3567,6 +3572,7 @@ func (c *WAFRegional) DisassociateWebACLRequest(input *DisassociateWebACLInput) output = &DisassociateWebACLOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6167,6 +6173,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) @@ -6821,16 +6856,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 +6885,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) @@ -6913,6 +6956,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 } @@ -9545,6 +9589,10 @@ func (s *GetWebACLForResourceOutput) SetWebACLSummary(v *waf.WebACLSummary) *Get type ListResourcesForWebACLInput struct { _ struct{} `type:"structure"` + // The type of resource to list, either and 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 +9626,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 @@ -10533,6 +10587,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 fed17a991..b82c80fc6 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 index e2e4418c4..0892e7c78 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/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 opAssociateIpGroups = "AssociateIpGroups" @@ -50,6 +52,7 @@ func (c *WorkSpaces) AssociateIpGroupsRequest(input *AssociateIpGroupsInput) (re output = &AssociateIpGroupsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -144,6 +147,7 @@ func (c *WorkSpaces) AuthorizeIpRulesRequest(input *AuthorizeIpRulesInput) (req output = &AuthorizeIpRulesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -341,6 +345,7 @@ func (c *WorkSpaces) CreateTagsRequest(input *CreateTagsInput) (req *request.Req output = &CreateTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -510,6 +515,7 @@ func (c *WorkSpaces) DeleteIpGroupRequest(input *DeleteIpGroupInput) (req *reque output = &DeleteIpGroupOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -600,6 +606,7 @@ func (c *WorkSpaces) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Req output = &DeleteTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -643,6 +650,338 @@ func (c *WorkSpaces) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInp 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 @@ -854,7 +1193,7 @@ func (c *WorkSpaces) DescribeWorkspaceBundlesRequest(input *DescribeWorkspaceBun // DescribeWorkspaceBundles API operation for Amazon WorkSpaces. // -// Describes the available WorkSpace bundles. +// Retrieves a list that describes the available WorkSpace bundles. // // You can filter the results using either bundle ID or owner, but not both. // @@ -1077,6 +1416,86 @@ func (c *WorkSpaces) DescribeWorkspaceDirectoriesPagesWithContext(ctx aws.Contex 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 @@ -1129,8 +1548,8 @@ func (c *WorkSpaces) DescribeWorkspacesRequest(input *DescribeWorkspacesInput) ( // // Describes the specified WorkSpaces. // -// You can filter the results using bundle ID, directory ID, or owner, but you -// can specify only one filter at a time. +// 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 @@ -1336,6 +1755,7 @@ func (c *WorkSpaces) DisassociateIpGroupsRequest(input *DisassociateIpGroupsInpu output = &DisassociateIpGroupsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1385,6 +1805,367 @@ func (c *WorkSpaces) DisassociateIpGroupsWithContext(ctx aws.Context, input *Dis 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 @@ -1424,6 +2205,7 @@ func (c *WorkSpaces) ModifyWorkspacePropertiesRequest(input *ModifyWorkspaceProp output = &ModifyWorkspacePropertiesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1523,6 +2305,7 @@ func (c *WorkSpaces) ModifyWorkspaceStateRequest(input *ModifyWorkspaceStateInpu output = &ModifyWorkspaceStateOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1773,6 +2556,7 @@ func (c *WorkSpaces) RevokeIpRulesRequest(input *RevokeIpRulesInput) (req *reque output = &RevokeIpRulesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2098,6 +2882,7 @@ func (c *WorkSpaces) UpdateRulesOfIpGroupRequest(input *UpdateRulesOfIpGroupInpu output = &UpdateRulesOfIpGroupOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2151,15 +2936,87 @@ func (c *WorkSpaces) UpdateRulesOfIpGroupWithContext(ctx aws.Context, input *Upd 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 ID of the directory. + // The identifier of the directory. // // DirectoryId is a required field DirectoryId *string `type:"string" required:"true"` - // The IDs of one or more IP access control groups. + // The identifiers of one or more IP access control groups. // // GroupIds is a required field GroupIds []*string `type:"list" required:"true"` @@ -2220,7 +3077,7 @@ func (s AssociateIpGroupsOutput) GoString() string { type AuthorizeIpRulesInput struct { _ struct{} `type:"structure"` - // The ID of the group. + // The identifier of the group. // // GroupId is a required field GroupId *string `type:"string" required:"true"` @@ -2283,7 +3140,66 @@ func (s AuthorizeIpRulesOutput) GoString() string { return s.String() } -// Information about the compute type. +// 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"` @@ -2366,7 +3282,7 @@ func (s *CreateIpGroupInput) SetUserRules(v []*IpRuleItem) *CreateIpGroupInput { type CreateIpGroupOutput struct { _ struct{} `type:"structure"` - // The ID of the group. + // The identifier of the group. GroupId *string `type:"string"` } @@ -2389,7 +3305,7 @@ func (s *CreateIpGroupOutput) SetGroupId(v string) *CreateIpGroupOutput { type CreateTagsInput struct { _ struct{} `type:"structure"` - // The ID of the WorkSpace. To find this ID, use DescribeWorkspaces. + // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -2552,7 +3468,7 @@ func (s *CreateWorkspacesOutput) SetPendingRequests(v []*Workspace) *CreateWorks return s } -// Information about defaults used to create a WorkSpace. +// Describes the default values used to create a WorkSpace. type DefaultWorkspaceCreationProperties struct { _ struct{} `type:"structure"` @@ -2566,10 +3482,10 @@ type DefaultWorkspaceCreationProperties struct { // The public IP address to attach to all WorkSpaces that are created or rebuilt. EnableInternetAccess *bool `type:"boolean"` - // Indicates whether the directory is enabled for Amazon WorkDocs. + // Specifies whether the directory is enabled for Amazon WorkDocs. EnableWorkDocs *bool `type:"boolean"` - // Indicates whether the WorkSpace user is an administrator on the WorkSpace. + // Specifies whether the WorkSpace user is an administrator on the WorkSpace. UserEnabledAsLocalAdministrator *bool `type:"boolean"` } @@ -2616,7 +3532,7 @@ func (s *DefaultWorkspaceCreationProperties) SetUserEnabledAsLocalAdministrator( type DeleteIpGroupInput struct { _ struct{} `type:"structure"` - // The ID of the IP access control group. + // The identifier of the IP access control group. // // GroupId is a required field GroupId *string `type:"string" required:"true"` @@ -2668,7 +3584,7 @@ func (s DeleteIpGroupOutput) GoString() string { type DeleteTagsInput struct { _ struct{} `type:"structure"` - // The ID of the WorkSpace. To find this ID, use DescribeWorkspaces. + // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -2734,17 +3650,255 @@ 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 IDs of one or more IP access control groups. + // 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"` - // The token for the next set of results. (You received this token from a previous - // call.) + // 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"` } @@ -2795,9 +3949,8 @@ func (s *DescribeIpGroupsInput) SetNextToken(v string) *DescribeIpGroupsInput { type DescribeIpGroupsOutput struct { _ struct{} `type:"structure"` - // 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. + // 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. @@ -2829,7 +3982,7 @@ func (s *DescribeIpGroupsOutput) SetResult(v []*IpGroup) *DescribeIpGroupsOutput type DescribeTagsInput struct { _ struct{} `type:"structure"` - // The ID of the WorkSpace. To find this ID, use DescribeWorkspaces. + // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -2893,15 +4046,15 @@ func (s *DescribeTagsOutput) SetTagList(v []*Tag) *DescribeTagsOutput { type DescribeWorkspaceBundlesInput struct { _ struct{} `type:"structure"` - // The IDs of the bundles. This parameter cannot be combined with any other - // filter. + // 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. This parameter cannot be combined with any other + // 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 @@ -2994,8 +4147,8 @@ type DescribeWorkspaceDirectoriesInput struct { // are retrieved. DirectoryIds []*string `min:"1" type:"list"` - // The token for the next set of results. (You received this token from a previous - // call.) + // 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"` } @@ -3043,9 +4196,8 @@ type DescribeWorkspaceDirectoriesOutput struct { // Information about the directories. Directories []*WorkspaceDirectory `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. + // 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"` } @@ -3071,11 +4223,105 @@ func (s *DescribeWorkspaceDirectoriesOutput) SetNextToken(v string) *DescribeWor 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"` - // The token for the next set of results. (You received this token from a previous - // call.) + // 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. @@ -3123,8 +4369,8 @@ func (s *DescribeWorkspacesConnectionStatusInput) SetWorkspaceIds(v []*string) * type DescribeWorkspacesConnectionStatusOutput struct { _ struct{} `type:"structure"` - // The token to use to retrieve the next set of results, or null if there are - // no more results available. + // 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. @@ -3156,27 +4402,27 @@ func (s *DescribeWorkspacesConnectionStatusOutput) SetWorkspacesConnectionStatus type DescribeWorkspacesInput struct { _ struct{} `type:"structure"` - // The ID of the bundle. All WorkSpaces that are created from this bundle are - // retrieved. This parameter cannot be combined with any other filter. + // 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 ID of the directory. In addition, you can optionally specify a specific - // directory user (see UserName). This parameter cannot be combined with any - // other filter. + // 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"` - // The token for the next set of results. (You received this token from a previous - // call.) + // 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 IDs of the WorkSpaces. This parameter cannot be combined with any other - // filter. + // 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 @@ -3255,9 +4501,8 @@ func (s *DescribeWorkspacesInput) SetWorkspaceIds(v []*string) *DescribeWorkspac type DescribeWorkspacesOutput struct { _ struct{} `type:"structure"` - // 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. + // 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. @@ -3292,12 +4537,12 @@ func (s *DescribeWorkspacesOutput) SetWorkspaces(v []*Workspace) *DescribeWorksp type DisassociateIpGroupsInput struct { _ struct{} `type:"structure"` - // The ID of the directory. + // The identifier of the directory. // // DirectoryId is a required field DirectoryId *string `type:"string" required:"true"` - // The IDs of one or more IP access control groups. + // The identifiers of one or more IP access control groups. // // GroupIds is a required field GroupIds []*string `type:"list" required:"true"` @@ -3355,14 +4600,15 @@ func (s DisassociateIpGroupsOutput) GoString() string { return s.String() } -// Information about a WorkSpace that could not be created. +// Describes a WorkSpace that cannot be created. type FailedCreateWorkspaceRequest struct { _ struct{} `type:"structure"` - // The error code. + // The error code that is returned if the WorkSpace cannot be created. ErrorCode *string `type:"string"` - // The textual error message. + // The text of the error message that is returned if the WorkSpace cannot be + // created. ErrorMessage *string `type:"string"` // Information about the WorkSpace. @@ -3397,16 +4643,17 @@ func (s *FailedCreateWorkspaceRequest) SetWorkspaceRequest(v *WorkspaceRequest) return s } -// Information about a WorkSpace that could not be rebooted (RebootWorkspaces), -// rebuilt (RebuildWorkspaces), terminated (TerminateWorkspaces), started (StartWorkspaces), +// 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. + // The error code that is returned if the WorkSpace cannot be rebooted. ErrorCode *string `type:"string"` - // The textual error message. + // The text of the error message that is returned if the WorkSpace cannot be + // rebooted. ErrorMessage *string `type:"string"` // The identifier of the WorkSpace. @@ -3441,14 +4688,123 @@ func (s *FailedWorkspaceChangeRequest) SetWorkspaceId(v string) *FailedWorkspace return s } -// Information about an IP access control group. +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 ID of the group. + // The identifier of the group. GroupId *string `locationName:"groupId" type:"string"` // The name of the group. @@ -3492,7 +4848,7 @@ func (s *IpGroup) SetUserRules(v []*IpRuleItem) *IpGroup { return s } -// Information about a rule for an IP access control group. +// Describes a rule for an IP access control group. type IpRuleItem struct { _ struct{} `type:"structure"` @@ -3525,7 +4881,105 @@ func (s *IpRuleItem) SetRuleDesc(v string) *IpRuleItem { return s } -// Information about a WorkSpace modification. +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"` @@ -3558,10 +5012,125 @@ func (s *ModificationState) SetState(v string) *ModificationState { 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 ID of the WorkSpace. + // The identifier of the WorkSpace. // // WorkspaceId is a required field WorkspaceId *string `type:"string" required:"true"` @@ -3627,7 +5196,7 @@ func (s ModifyWorkspacePropertiesOutput) GoString() string { type ModifyWorkspaceStateInput struct { _ struct{} `type:"structure"` - // The ID of the WorkSpace. + // The identifier of the WorkSpace. // // WorkspaceId is a required field WorkspaceId *string `type:"string" required:"true"` @@ -3690,11 +5259,35 @@ func (s ModifyWorkspaceStateOutput) GoString() string { return s.String() } -// Information used to reboot a WorkSpace. +// 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 ID of the WorkSpace. + // The identifier of the WorkSpace. // // WorkspaceId is a required field WorkspaceId *string `type:"string" required:"true"` @@ -3803,11 +5396,11 @@ func (s *RebootWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeReq return s } -// Information used to rebuild a WorkSpace. +// Describes the information used to rebuild a WorkSpace. type RebuildRequest struct { _ struct{} `type:"structure"` - // The ID of the WorkSpace. + // The identifier of the WorkSpace. // // WorkspaceId is a required field WorkspaceId *string `type:"string" required:"true"` @@ -3896,7 +5489,7 @@ func (s *RebuildWorkspacesInput) SetRebuildWorkspaceRequests(v []*RebuildRequest type RebuildWorkspacesOutput struct { _ struct{} `type:"structure"` - // Information about the WorkSpace if it could not be rebuilt. + // Information about the WorkSpace that could not be rebuilt. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` } @@ -3919,7 +5512,7 @@ func (s *RebuildWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRe type RevokeIpRulesInput struct { _ struct{} `type:"structure"` - // The ID of the group. + // The identifier of the group. // // GroupId is a required field GroupId *string `type:"string" required:"true"` @@ -3982,7 +5575,7 @@ func (s RevokeIpRulesOutput) GoString() string { return s.String() } -// Information about the root volume for a WorkSpace bundle. +// Describes the root volume for a WorkSpace bundle. type RootStorage struct { _ struct{} `type:"structure"` @@ -4010,7 +5603,7 @@ func (s *RootStorage) SetCapacity(v string) *RootStorage { type StartRequest struct { _ struct{} `type:"structure"` - // The ID of the WorkSpace. + // The identifier of the WorkSpace. WorkspaceId *string `type:"string"` } @@ -4094,11 +5687,11 @@ func (s *StartWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequ return s } -// Information used to stop a WorkSpace. +// Describes the information used to stop a WorkSpace. type StopRequest struct { _ struct{} `type:"structure"` - // The ID of the WorkSpace. + // The identifier of the WorkSpace. WorkspaceId *string `type:"string"` } @@ -4182,7 +5775,7 @@ func (s *StopWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeReque return s } -// Information about a tag. +// Describes a tag. type Tag struct { _ struct{} `type:"structure"` @@ -4233,11 +5826,11 @@ func (s *Tag) SetValue(v string) *Tag { return s } -// Information used to terminate a WorkSpace. +// Describes the information used to terminate a WorkSpace. type TerminateRequest struct { _ struct{} `type:"structure"` - // The ID of the WorkSpace. + // The identifier of the WorkSpace. // // WorkspaceId is a required field WorkspaceId *string `type:"string" required:"true"` @@ -4349,7 +5942,7 @@ func (s *TerminateWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChange type UpdateRulesOfIpGroupInput struct { _ struct{} `type:"structure"` - // The ID of the group. + // The identifier of the group. // // GroupId is a required field GroupId *string `type:"string" required:"true"` @@ -4412,7 +6005,7 @@ func (s UpdateRulesOfIpGroupOutput) GoString() string { return s.String() } -// Information about the user storage for a WorkSpace bundle. +// Describes the user storage for a WorkSpace bundle. type UserStorage struct { _ struct{} `type:"structure"` @@ -4436,7 +6029,7 @@ func (s *UserStorage) SetCapacity(v string) *UserStorage { return s } -// Information about a WorkSpace. +// Describes a WorkSpace. type Workspace struct { _ struct{} `type:"structure"` @@ -4449,11 +6042,11 @@ type Workspace struct { // The identifier of the AWS Directory Service directory for the WorkSpace. DirectoryId *string `type:"string"` - // If the WorkSpace could not be created, contains the error code. + // The error code that is returned if the WorkSpace cannot be created. ErrorCode *string `type:"string"` - // If the WorkSpace could not be created, contains a textual error message that - // describes the failure. + // 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. @@ -4587,7 +6180,7 @@ func (s *Workspace) SetWorkspaceProperties(v *WorkspaceProperties) *Workspace { return s } -// Information about a WorkSpace bundle. +// Describes a WorkSpace bundle. type WorkspaceBundle struct { _ struct{} `type:"structure"` @@ -4674,13 +6267,13 @@ type WorkspaceConnectionStatus struct { // the WorkSpace is stopped. ConnectionState *string `type:"string" enum:"ConnectionState"` - // The timestamp of the connection state check. + // 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 ID of the WorkSpace. + // The identifier of the WorkSpace. WorkspaceId *string `type:"string"` } @@ -4718,8 +6311,7 @@ func (s *WorkspaceConnectionStatus) SetWorkspaceId(v string) *WorkspaceConnectio return s } -// Information about an AWS Directory Service directory for use with Amazon -// WorkSpaces. +// Describes an AWS Directory Service directory that is used with Amazon WorkSpaces. type WorkspaceDirectory struct { _ struct{} `type:"structure"` @@ -4853,7 +6445,95 @@ func (s *WorkspaceDirectory) SetWorkspaceSecurityGroupId(v string) *WorkspaceDir return s } -// Information about a WorkSpace. +// 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"` @@ -4915,7 +6595,7 @@ func (s *WorkspaceProperties) SetUserVolumeSizeGib(v int64) *WorkspaceProperties return s } -// Information used to create a WorkSpace. +// Describes the information used to create a WorkSpace. type WorkspaceRequest struct { _ struct{} `type:"structure"` @@ -5058,6 +6738,12 @@ const ( // 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 ( @@ -5071,6 +6757,30 @@ const ( 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" @@ -5090,6 +6800,22 @@ const ( 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" @@ -5131,6 +6857,36 @@ const ( 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" 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 index cae0167d1..882a1973f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go @@ -4,7 +4,7 @@ // requests to Amazon WorkSpaces. // // Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft -// Windows desktops for your users. +// 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. // diff --git a/vendor/github.com/go-ini/ini/.gitignore b/vendor/github.com/go-ini/ini/.gitignore deleted file mode 100644 index c5203bf6e..000000000 --- a/vendor/github.com/go-ini/ini/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -testdata/conf_out.ini -ini.sublime-project -ini.sublime-workspace -testdata/conf_reflect.ini -.idea diff --git a/vendor/github.com/go-ini/ini/.travis.yml b/vendor/github.com/go-ini/ini/.travis.yml deleted file mode 100644 index 65c872bad..000000000 --- a/vendor/github.com/go-ini/ini/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: false -language: go -go: - - 1.4.x - - 1.5.x - - 1.6.x - - 1.7.x - - master - -script: - - go get golang.org/x/tools/cmd/cover - - go get github.com/smartystreets/goconvey - - go test -v -cover -race - -notifications: - email: - - u@gogs.io diff --git a/vendor/github.com/go-ini/ini/LICENSE b/vendor/github.com/go-ini/ini/LICENSE deleted file mode 100644 index 37ec93a14..000000000 --- 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 [yyyy] [name of copyright owner] - - 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/Makefile b/vendor/github.com/go-ini/ini/Makefile deleted file mode 100644 index ac034e525..000000000 --- a/vendor/github.com/go-ini/ini/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -.PHONY: build test bench vet - -build: vet bench - -test: - go test -v -cover -race - -bench: - go test -v -cover -race -test.bench=. -test.benchmem - -vet: - go vet diff --git a/vendor/github.com/go-ini/ini/README.md b/vendor/github.com/go-ini/ini/README.md deleted file mode 100644 index 85947422d..000000000 --- a/vendor/github.com/go-ini/ini/README.md +++ /dev/null @@ -1,740 +0,0 @@ -INI [![Build Status](https://travis-ci.org/go-ini/ini.svg?branch=master)](https://travis-ci.org/go-ini/ini) [![Sourcegraph](https://sourcegraph.com/github.com/go-ini/ini/-/badge.svg)](https://sourcegraph.com/github.com/go-ini/ini?badge) -=== - -![](https://avatars0.githubusercontent.com/u/10216035?v=3&s=200) - -Package ini provides INI file read and write functionality in Go. - -[简体中文](README_ZH.md) - -## Feature - -- Load multiple data sources(`[]byte`, file and `io.ReadCloser`) with overwrites. -- Read with recursion values. -- Read with parent-child sections. -- Read with auto-increment key names. -- Read with multiple-line values. -- Read with tons of helper methods. -- Read and convert values to Go types. -- Read and **WRITE** comments of sections and keys. -- Manipulate sections, keys and comments with ease. -- Keep sections and keys in order as you parse and save. - -## Installation - -To use a tagged revision: - - go get gopkg.in/ini.v1 - -To use with latest changes: - - go get github.com/go-ini/ini - -Please add `-u` flag to update in the future. - -### Testing - -If you want to test on your machine, please apply `-t` flag: - - go get -t gopkg.in/ini.v1 - -Please add `-u` flag to update in the future. - -## Getting Started - -### Loading from data sources - -A **Data Source** is either raw data in type `[]byte`, a file name with type `string` or `io.ReadCloser`. You can load **as many data sources as you want**. Passing other types will simply return an error. - -```go -cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data")))) -``` - -Or start with an empty object: - -```go -cfg := ini.Empty() -``` - -When you cannot decide how many data sources to load at the beginning, you will still be able to **Append()** them later. - -```go -err := cfg.Append("other file", []byte("other raw data")) -``` - -If you have a list of files with possibilities that some of them may not available at the time, and you don't know exactly which ones, you can use `LooseLoad` to ignore nonexistent files without returning error. - -```go -cfg, err := ini.LooseLoad("filename", "filename_404") -``` - -The cool thing is, whenever the file is available to load while you're calling `Reload` method, it will be counted as usual. - -#### Ignore cases of key name - -When you do not care about cases of section and key names, you can use `InsensitiveLoad` to force all names to be lowercased while parsing. - -```go -cfg, err := ini.InsensitiveLoad("filename") -//... - -// sec1 and sec2 are the exactly same section object -sec1, err := cfg.GetSection("Section") -sec2, err := cfg.GetSection("SecTIOn") - -// key1 and key2 are the exactly same key object -key1, err := cfg.GetKey("Key") -key2, err := cfg.GetKey("KeY") -``` - -#### MySQL-like boolean key - -MySQL's configuration allows a key without value as follows: - -```ini -[mysqld] -... -skip-host-cache -skip-name-resolve -``` - -By default, this is considered as missing value. But if you know you're going to deal with those cases, you can assign advanced load options: - -```go -cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, "my.cnf")) -``` - -The value of those keys are always `true`, and when you save to a file, it will keep in the same foramt as you read. - -To generate such keys in your program, you could use `NewBooleanKey`: - -```go -key, err := sec.NewBooleanKey("skip-host-cache") -``` - -#### Comment - -Take care that following format will be treated as comment: - -1. Line begins with `#` or `;` -2. Words after `#` or `;` -3. Words after section name (i.e words after `[some section name]`) - -If you want to save a value with `#` or `;`, please quote them with ``` ` ``` or ``` """ ```. - -### Working with sections - -To get a section, you would need to: - -```go -section, err := cfg.GetSection("section name") -``` - -For a shortcut for default section, just give an empty string as name: - -```go -section, err := cfg.GetSection("") -``` - -When you're pretty sure the section exists, following code could make your life easier: - -```go -section := cfg.Section("section name") -``` - -What happens when the section somehow does not exist? Don't panic, it automatically creates and returns a new section to you. - -To create a new section: - -```go -err := cfg.NewSection("new section") -``` - -To get a list of sections or section names: - -```go -sections := cfg.Sections() -names := cfg.SectionStrings() -``` - -### Working with keys - -To get a key under a section: - -```go -key, err := cfg.Section("").GetKey("key name") -``` - -Same rule applies to key operations: - -```go -key := cfg.Section("").Key("key name") -``` - -To check if a key exists: - -```go -yes := cfg.Section("").HasKey("key name") -``` - -To create a new key: - -```go -err := cfg.Section("").NewKey("name", "value") -``` - -To get a list of keys or key names: - -```go -keys := cfg.Section("").Keys() -names := cfg.Section("").KeyStrings() -``` - -To get a clone hash of keys and corresponding values: - -```go -hash := cfg.Section("").KeysHash() -``` - -### Working with values - -To get a string value: - -```go -val := cfg.Section("").Key("key name").String() -``` - -To validate key value on the fly: - -```go -val := cfg.Section("").Key("key name").Validate(func(in string) string { - if len(in) == 0 { - return "default" - } - return in -}) -``` - -If you do not want any auto-transformation (such as recursive read) for the values, you can get raw value directly (this way you get much better performance): - -```go -val := cfg.Section("").Key("key name").Value() -``` - -To check if raw value exists: - -```go -yes := cfg.Section("").HasValue("test value") -``` - -To get value with types: - -```go -// For boolean values: -// true when value is: 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On -// false when value is: 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off -v, err = cfg.Section("").Key("BOOL").Bool() -v, err = cfg.Section("").Key("FLOAT64").Float64() -v, err = cfg.Section("").Key("INT").Int() -v, err = cfg.Section("").Key("INT64").Int64() -v, err = cfg.Section("").Key("UINT").Uint() -v, err = cfg.Section("").Key("UINT64").Uint64() -v, err = cfg.Section("").Key("TIME").TimeFormat(time.RFC3339) -v, err = cfg.Section("").Key("TIME").Time() // RFC3339 - -v = cfg.Section("").Key("BOOL").MustBool() -v = cfg.Section("").Key("FLOAT64").MustFloat64() -v = cfg.Section("").Key("INT").MustInt() -v = cfg.Section("").Key("INT64").MustInt64() -v = cfg.Section("").Key("UINT").MustUint() -v = cfg.Section("").Key("UINT64").MustUint64() -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339) -v = cfg.Section("").Key("TIME").MustTime() // RFC3339 - -// Methods start with Must also accept one argument for default value -// when key not found or fail to parse value to given type. -// Except method MustString, which you have to pass a default value. - -v = cfg.Section("").Key("String").MustString("default") -v = cfg.Section("").Key("BOOL").MustBool(true) -v = cfg.Section("").Key("FLOAT64").MustFloat64(1.25) -v = cfg.Section("").Key("INT").MustInt(10) -v = cfg.Section("").Key("INT64").MustInt64(99) -v = cfg.Section("").Key("UINT").MustUint(3) -v = cfg.Section("").Key("UINT64").MustUint64(6) -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339, time.Now()) -v = cfg.Section("").Key("TIME").MustTime(time.Now()) // RFC3339 -``` - -What if my value is three-line long? - -```ini -[advance] -ADDRESS = """404 road, -NotFound, State, 5000 -Earth""" -``` - -Not a problem! - -```go -cfg.Section("advance").Key("ADDRESS").String() - -/* --- start --- -404 road, -NotFound, State, 5000 -Earth ------- end --- */ -``` - -That's cool, how about continuation lines? - -```ini -[advance] -two_lines = how about \ - continuation lines? -lots_of_lines = 1 \ - 2 \ - 3 \ - 4 -``` - -Piece of cake! - -```go -cfg.Section("advance").Key("two_lines").String() // how about continuation lines? -cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4 -``` - -Well, I hate continuation lines, how do I disable that? - -```go -cfg, err := ini.LoadSources(ini.LoadOptions{ - IgnoreContinuation: true, -}, "filename") -``` - -Holy crap! - -Note that single quotes around values will be stripped: - -```ini -foo = "some value" // foo: some value -bar = 'some value' // bar: some value -``` - -That's all? Hmm, no. - -#### Helper methods of working with values - -To get value with given candidates: - -```go -v = cfg.Section("").Key("STRING").In("default", []string{"str", "arr", "types"}) -v = cfg.Section("").Key("FLOAT64").InFloat64(1.1, []float64{1.25, 2.5, 3.75}) -v = cfg.Section("").Key("INT").InInt(5, []int{10, 20, 30}) -v = cfg.Section("").Key("INT64").InInt64(10, []int64{10, 20, 30}) -v = cfg.Section("").Key("UINT").InUint(4, []int{3, 6, 9}) -v = cfg.Section("").Key("UINT64").InUint64(8, []int64{3, 6, 9}) -v = cfg.Section("").Key("TIME").InTimeFormat(time.RFC3339, time.Now(), []time.Time{time1, time2, time3}) -v = cfg.Section("").Key("TIME").InTime(time.Now(), []time.Time{time1, time2, time3}) // RFC3339 -``` - -Default value will be presented if value of key is not in candidates you given, and default value does not need be one of candidates. - -To validate value in a given range: - -```go -vals = cfg.Section("").Key("FLOAT64").RangeFloat64(0.0, 1.1, 2.2) -vals = cfg.Section("").Key("INT").RangeInt(0, 10, 20) -vals = cfg.Section("").Key("INT64").RangeInt64(0, 10, 20) -vals = cfg.Section("").Key("UINT").RangeUint(0, 3, 9) -vals = cfg.Section("").Key("UINT64").RangeUint64(0, 3, 9) -vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), minTime, maxTime) -vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339 -``` - -##### Auto-split values into a slice - -To use zero value of type for invalid inputs: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> [0.0 2.2 0.0 0.0] -vals = cfg.Section("").Key("STRINGS").Strings(",") -vals = cfg.Section("").Key("FLOAT64S").Float64s(",") -vals = cfg.Section("").Key("INTS").Ints(",") -vals = cfg.Section("").Key("INT64S").Int64s(",") -vals = cfg.Section("").Key("UINTS").Uints(",") -vals = cfg.Section("").Key("UINT64S").Uint64s(",") -vals = cfg.Section("").Key("TIMES").Times(",") -``` - -To exclude invalid values out of result slice: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> [2.2] -vals = cfg.Section("").Key("FLOAT64S").ValidFloat64s(",") -vals = cfg.Section("").Key("INTS").ValidInts(",") -vals = cfg.Section("").Key("INT64S").ValidInt64s(",") -vals = cfg.Section("").Key("UINTS").ValidUints(",") -vals = cfg.Section("").Key("UINT64S").ValidUint64s(",") -vals = cfg.Section("").Key("TIMES").ValidTimes(",") -``` - -Or to return nothing but error when have invalid inputs: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> error -vals = cfg.Section("").Key("FLOAT64S").StrictFloat64s(",") -vals = cfg.Section("").Key("INTS").StrictInts(",") -vals = cfg.Section("").Key("INT64S").StrictInt64s(",") -vals = cfg.Section("").Key("UINTS").StrictUints(",") -vals = cfg.Section("").Key("UINT64S").StrictUint64s(",") -vals = cfg.Section("").Key("TIMES").StrictTimes(",") -``` - -### Save your configuration - -Finally, it's time to save your configuration to somewhere. - -A typical way to save configuration is writing it to a file: - -```go -// ... -err = cfg.SaveTo("my.ini") -err = cfg.SaveToIndent("my.ini", "\t") -``` - -Another way to save is writing to a `io.Writer` interface: - -```go -// ... -cfg.WriteTo(writer) -cfg.WriteToIndent(writer, "\t") -``` - -By default, spaces are used to align "=" sign between key and values, to disable that: - -```go -ini.PrettyFormat = false -``` - -## Advanced Usage - -### Recursive Values - -For all value of keys, there is a special syntax `%()s`, where `` is the key name in same section or default section, and `%()s` will be replaced by corresponding value(empty string if key not found). You can use this syntax at most 99 level of recursions. - -```ini -NAME = ini - -[author] -NAME = Unknwon -GITHUB = https://github.com/%(NAME)s - -[package] -FULL_NAME = github.com/go-ini/%(NAME)s -``` - -```go -cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon -cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini -``` - -### Parent-child Sections - -You can use `.` in section name to indicate parent-child relationship between two or more sections. If the key not found in the child section, library will try again on its parent section until there is no parent section. - -```ini -NAME = ini -VERSION = v1 -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -[package] -CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] -``` - -```go -cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1 -``` - -#### Retrieve parent keys available to a child section - -```go -cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"] -``` - -### Unparseable Sections - -Sometimes, you have sections that do not contain key-value pairs but raw content, to handle such case, you can use `LoadOptions.UnparsableSections`: - -```go -cfg, err := LoadSources(LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS] -<1> This slide has the fuel listed in the wrong units `)) - -body := cfg.Section("COMMENTS").Body() - -/* --- start --- -<1> This slide has the fuel listed in the wrong units ------- end --- */ -``` - -### Auto-increment Key Names - -If key name is `-` in data source, then it would be seen as special syntax for auto-increment key name start from 1, and every section is independent on counter. - -```ini -[features] --: Support read/write comments of keys and sections --: Support auto-increment of key names --: Support load multiple files to overwrite key values -``` - -```go -cfg.Section("features").KeyStrings() // []{"#1", "#2", "#3"} -``` - -### Map To Struct - -Want more objective way to play with INI? Cool. - -```ini -Name = Unknwon -age = 21 -Male = true -Born = 1993-01-01T20:17:05Z - -[Note] -Content = Hi is a good man! -Cities = HangZhou, Boston -``` - -```go -type Note struct { - Content string - Cities []string -} - -type Person struct { - Name string - Age int `ini:"age"` - Male bool - Born time.Time - Note - Created time.Time `ini:"-"` -} - -func main() { - cfg, err := ini.Load("path/to/ini") - // ... - p := new(Person) - err = cfg.MapTo(p) - // ... - - // Things can be simpler. - err = ini.MapTo(p, "path/to/ini") - // ... - - // Just map a section? Fine. - n := new(Note) - err = cfg.Section("Note").MapTo(n) - // ... -} -``` - -Can I have default value for field? Absolutely. - -Assign it before you map to struct. It will keep the value as it is if the key is not presented or got wrong type. - -```go -// ... -p := &Person{ - Name: "Joe", -} -// ... -``` - -It's really cool, but what's the point if you can't give me my file back from struct? - -### Reflect From Struct - -Why not? - -```go -type Embeded struct { - Dates []time.Time `delim:"|"` - Places []string `ini:"places,omitempty"` - None []int `ini:",omitempty"` -} - -type Author struct { - Name string `ini:"NAME"` - Male bool - Age int - GPA float64 - NeverMind string `ini:"-"` - *Embeded -} - -func main() { - a := &Author{"Unknwon", true, 21, 2.8, "", - &Embeded{ - []time.Time{time.Now(), time.Now()}, - []string{"HangZhou", "Boston"}, - []int{}, - }} - cfg := ini.Empty() - err = ini.ReflectFrom(cfg, a) - // ... -} -``` - -So, what do I get? - -```ini -NAME = Unknwon -Male = true -Age = 21 -GPA = 2.8 - -[Embeded] -Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00 -places = HangZhou,Boston -``` - -#### Name Mapper - -To save your time and make your code cleaner, this library supports [`NameMapper`](https://gowalker.org/gopkg.in/ini.v1#NameMapper) between struct field and actual section and key name. - -There are 2 built-in name mappers: - -- `AllCapsUnderscore`: it converts to format `ALL_CAPS_UNDERSCORE` then match section or key. -- `TitleUnderscore`: it converts to format `title_underscore` then match section or key. - -To use them: - -```go -type Info struct { - PackageName string -} - -func main() { - err = ini.MapToWithMapper(&Info{}, ini.TitleUnderscore, []byte("package_name=ini")) - // ... - - cfg, err := ini.Load([]byte("PACKAGE_NAME=ini")) - // ... - info := new(Info) - cfg.NameMapper = ini.AllCapsUnderscore - err = cfg.MapTo(info) - // ... -} -``` - -Same rules of name mapper apply to `ini.ReflectFromWithMapper` function. - -#### Value Mapper - -To expand values (e.g. from environment variables), you can use the `ValueMapper` to transform values: - -```go -type Env struct { - Foo string `ini:"foo"` -} - -func main() { - cfg, err := ini.Load([]byte("[env]\nfoo = ${MY_VAR}\n") - cfg.ValueMapper = os.ExpandEnv - // ... - env := &Env{} - err = cfg.Section("env").MapTo(env) -} -``` - -This would set the value of `env.Foo` to the value of the environment variable `MY_VAR`. - -#### Other Notes On Map/Reflect - -Any embedded struct is treated as a section by default, and there is no automatic parent-child relations in map/reflect feature: - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child -} - -type Config struct { - City string - Parent -} -``` - -Example configuration: - -```ini -City = Boston - -[Parent] -Name = Unknwon - -[Child] -Age = 21 -``` - -What if, yes, I'm paranoid, I want embedded struct to be in the same section. Well, all roads lead to Rome. - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child `ini:"Parent"` -} - -type Config struct { - City string - Parent -} -``` - -Example configuration: - -```ini -City = Boston - -[Parent] -Name = Unknwon -Age = 21 -``` - -## Getting Help - -- [API Documentation](https://gowalker.org/gopkg.in/ini.v1) -- [File An Issue](https://github.com/go-ini/ini/issues/new) - -## FAQs - -### What does `BlockMode` field do? - -By default, library lets you read and write values so we need a locker to make sure your data is safe. But in cases that you are very sure about only reading data through the library, you can set `cfg.BlockMode = false` to speed up read operations about **50-70%** faster. - -### Why another INI library? - -Many people are using my another INI library [goconfig](https://github.com/Unknwon/goconfig), so the reason for this one is I would like to make more Go style code. Also when you set `cfg.BlockMode = false`, this one is about **10-30%** faster. - -To make those changes I have to confirm API broken, so it's safer to keep it in another place and start using `gopkg.in` to version my package at this time.(PS: shorter import path) - -## License - -This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text. diff --git a/vendor/github.com/go-ini/ini/README_ZH.md b/vendor/github.com/go-ini/ini/README_ZH.md deleted file mode 100644 index 163432db9..000000000 --- a/vendor/github.com/go-ini/ini/README_ZH.md +++ /dev/null @@ -1,727 +0,0 @@ -本包提供了 Go 语言中读写 INI 文件的功能。 - -## 功能特性 - -- 支持覆盖加载多个数据源(`[]byte`、文件和 `io.ReadCloser`) -- 支持递归读取键值 -- 支持读取父子分区 -- 支持读取自增键名 -- 支持读取多行的键值 -- 支持大量辅助方法 -- 支持在读取时直接转换为 Go 语言类型 -- 支持读取和 **写入** 分区和键的注释 -- 轻松操作分区、键值和注释 -- 在保存文件时分区和键值会保持原有的顺序 - -## 下载安装 - -使用一个特定版本: - - go get gopkg.in/ini.v1 - -使用最新版: - - go get github.com/go-ini/ini - -如需更新请添加 `-u` 选项。 - -### 测试安装 - -如果您想要在自己的机器上运行测试,请使用 `-t` 标记: - - go get -t gopkg.in/ini.v1 - -如需更新请添加 `-u` 选项。 - -## 开始使用 - -### 从数据源加载 - -一个 **数据源** 可以是 `[]byte` 类型的原始数据,`string` 类型的文件路径或 `io.ReadCloser`。您可以加载 **任意多个** 数据源。如果您传递其它类型的数据源,则会直接返回错误。 - -```go -cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data")))) -``` - -或者从一个空白的文件开始: - -```go -cfg := ini.Empty() -``` - -当您在一开始无法决定需要加载哪些数据源时,仍可以使用 **Append()** 在需要的时候加载它们。 - -```go -err := cfg.Append("other file", []byte("other raw data")) -``` - -当您想要加载一系列文件,但是不能够确定其中哪些文件是不存在的,可以通过调用函数 `LooseLoad` 来忽略它们(`Load` 会因为文件不存在而返回错误): - -```go -cfg, err := ini.LooseLoad("filename", "filename_404") -``` - -更牛逼的是,当那些之前不存在的文件在重新调用 `Reload` 方法的时候突然出现了,那么它们会被正常加载。 - -#### 忽略键名的大小写 - -有时候分区和键的名称大小写混合非常烦人,这个时候就可以通过 `InsensitiveLoad` 将所有分区和键名在读取里强制转换为小写: - -```go -cfg, err := ini.InsensitiveLoad("filename") -//... - -// sec1 和 sec2 指向同一个分区对象 -sec1, err := cfg.GetSection("Section") -sec2, err := cfg.GetSection("SecTIOn") - -// key1 和 key2 指向同一个键对象 -key1, err := cfg.GetKey("Key") -key2, err := cfg.GetKey("KeY") -``` - -#### 类似 MySQL 配置中的布尔值键 - -MySQL 的配置文件中会出现没有具体值的布尔类型的键: - -```ini -[mysqld] -... -skip-host-cache -skip-name-resolve -``` - -默认情况下这被认为是缺失值而无法完成解析,但可以通过高级的加载选项对它们进行处理: - -```go -cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, "my.cnf")) -``` - -这些键的值永远为 `true`,且在保存到文件时也只会输出键名。 - -如果您想要通过程序来生成此类键,则可以使用 `NewBooleanKey`: - -```go -key, err := sec.NewBooleanKey("skip-host-cache") -``` - -#### 关于注释 - -下述几种情况的内容将被视为注释: - -1. 所有以 `#` 或 `;` 开头的行 -2. 所有在 `#` 或 `;` 之后的内容 -3. 分区标签后的文字 (即 `[分区名]` 之后的内容) - -如果你希望使用包含 `#` 或 `;` 的值,请使用 ``` ` ``` 或 ``` """ ``` 进行包覆。 - -### 操作分区(Section) - -获取指定分区: - -```go -section, err := cfg.GetSection("section name") -``` - -如果您想要获取默认分区,则可以用空字符串代替分区名: - -```go -section, err := cfg.GetSection("") -``` - -当您非常确定某个分区是存在的,可以使用以下简便方法: - -```go -section := cfg.Section("section name") -``` - -如果不小心判断错了,要获取的分区其实是不存在的,那会发生什么呢?没事的,它会自动创建并返回一个对应的分区对象给您。 - -创建一个分区: - -```go -err := cfg.NewSection("new section") -``` - -获取所有分区对象或名称: - -```go -sections := cfg.Sections() -names := cfg.SectionStrings() -``` - -### 操作键(Key) - -获取某个分区下的键: - -```go -key, err := cfg.Section("").GetKey("key name") -``` - -和分区一样,您也可以直接获取键而忽略错误处理: - -```go -key := cfg.Section("").Key("key name") -``` - -判断某个键是否存在: - -```go -yes := cfg.Section("").HasKey("key name") -``` - -创建一个新的键: - -```go -err := cfg.Section("").NewKey("name", "value") -``` - -获取分区下的所有键或键名: - -```go -keys := cfg.Section("").Keys() -names := cfg.Section("").KeyStrings() -``` - -获取分区下的所有键值对的克隆: - -```go -hash := cfg.Section("").KeysHash() -``` - -### 操作键值(Value) - -获取一个类型为字符串(string)的值: - -```go -val := cfg.Section("").Key("key name").String() -``` - -获取值的同时通过自定义函数进行处理验证: - -```go -val := cfg.Section("").Key("key name").Validate(func(in string) string { - if len(in) == 0 { - return "default" - } - return in -}) -``` - -如果您不需要任何对值的自动转变功能(例如递归读取),可以直接获取原值(这种方式性能最佳): - -```go -val := cfg.Section("").Key("key name").Value() -``` - -判断某个原值是否存在: - -```go -yes := cfg.Section("").HasValue("test value") -``` - -获取其它类型的值: - -```go -// 布尔值的规则: -// true 当值为:1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On -// false 当值为:0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off -v, err = cfg.Section("").Key("BOOL").Bool() -v, err = cfg.Section("").Key("FLOAT64").Float64() -v, err = cfg.Section("").Key("INT").Int() -v, err = cfg.Section("").Key("INT64").Int64() -v, err = cfg.Section("").Key("UINT").Uint() -v, err = cfg.Section("").Key("UINT64").Uint64() -v, err = cfg.Section("").Key("TIME").TimeFormat(time.RFC3339) -v, err = cfg.Section("").Key("TIME").Time() // RFC3339 - -v = cfg.Section("").Key("BOOL").MustBool() -v = cfg.Section("").Key("FLOAT64").MustFloat64() -v = cfg.Section("").Key("INT").MustInt() -v = cfg.Section("").Key("INT64").MustInt64() -v = cfg.Section("").Key("UINT").MustUint() -v = cfg.Section("").Key("UINT64").MustUint64() -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339) -v = cfg.Section("").Key("TIME").MustTime() // RFC3339 - -// 由 Must 开头的方法名允许接收一个相同类型的参数来作为默认值, -// 当键不存在或者转换失败时,则会直接返回该默认值。 -// 但是,MustString 方法必须传递一个默认值。 - -v = cfg.Seciont("").Key("String").MustString("default") -v = cfg.Section("").Key("BOOL").MustBool(true) -v = cfg.Section("").Key("FLOAT64").MustFloat64(1.25) -v = cfg.Section("").Key("INT").MustInt(10) -v = cfg.Section("").Key("INT64").MustInt64(99) -v = cfg.Section("").Key("UINT").MustUint(3) -v = cfg.Section("").Key("UINT64").MustUint64(6) -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339, time.Now()) -v = cfg.Section("").Key("TIME").MustTime(time.Now()) // RFC3339 -``` - -如果我的值有好多行怎么办? - -```ini -[advance] -ADDRESS = """404 road, -NotFound, State, 5000 -Earth""" -``` - -嗯哼?小 case! - -```go -cfg.Section("advance").Key("ADDRESS").String() - -/* --- start --- -404 road, -NotFound, State, 5000 -Earth ------- end --- */ -``` - -赞爆了!那要是我属于一行的内容写不下想要写到第二行怎么办? - -```ini -[advance] -two_lines = how about \ - continuation lines? -lots_of_lines = 1 \ - 2 \ - 3 \ - 4 -``` - -简直是小菜一碟! - -```go -cfg.Section("advance").Key("two_lines").String() // how about continuation lines? -cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4 -``` - -可是我有时候觉得两行连在一起特别没劲,怎么才能不自动连接两行呢? - -```go -cfg, err := ini.LoadSources(ini.LoadOptions{ - IgnoreContinuation: true, -}, "filename") -``` - -哇靠给力啊! - -需要注意的是,值两侧的单引号会被自动剔除: - -```ini -foo = "some value" // foo: some value -bar = 'some value' // bar: some value -``` - -这就是全部了?哈哈,当然不是。 - -#### 操作键值的辅助方法 - -获取键值时设定候选值: - -```go -v = cfg.Section("").Key("STRING").In("default", []string{"str", "arr", "types"}) -v = cfg.Section("").Key("FLOAT64").InFloat64(1.1, []float64{1.25, 2.5, 3.75}) -v = cfg.Section("").Key("INT").InInt(5, []int{10, 20, 30}) -v = cfg.Section("").Key("INT64").InInt64(10, []int64{10, 20, 30}) -v = cfg.Section("").Key("UINT").InUint(4, []int{3, 6, 9}) -v = cfg.Section("").Key("UINT64").InUint64(8, []int64{3, 6, 9}) -v = cfg.Section("").Key("TIME").InTimeFormat(time.RFC3339, time.Now(), []time.Time{time1, time2, time3}) -v = cfg.Section("").Key("TIME").InTime(time.Now(), []time.Time{time1, time2, time3}) // RFC3339 -``` - -如果获取到的值不是候选值的任意一个,则会返回默认值,而默认值不需要是候选值中的一员。 - -验证获取的值是否在指定范围内: - -```go -vals = cfg.Section("").Key("FLOAT64").RangeFloat64(0.0, 1.1, 2.2) -vals = cfg.Section("").Key("INT").RangeInt(0, 10, 20) -vals = cfg.Section("").Key("INT64").RangeInt64(0, 10, 20) -vals = cfg.Section("").Key("UINT").RangeUint(0, 3, 9) -vals = cfg.Section("").Key("UINT64").RangeUint64(0, 3, 9) -vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), minTime, maxTime) -vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339 -``` - -##### 自动分割键值到切片(slice) - -当存在无效输入时,使用零值代替: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> [0.0 2.2 0.0 0.0] -vals = cfg.Section("").Key("STRINGS").Strings(",") -vals = cfg.Section("").Key("FLOAT64S").Float64s(",") -vals = cfg.Section("").Key("INTS").Ints(",") -vals = cfg.Section("").Key("INT64S").Int64s(",") -vals = cfg.Section("").Key("UINTS").Uints(",") -vals = cfg.Section("").Key("UINT64S").Uint64s(",") -vals = cfg.Section("").Key("TIMES").Times(",") -``` - -从结果切片中剔除无效输入: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> [2.2] -vals = cfg.Section("").Key("FLOAT64S").ValidFloat64s(",") -vals = cfg.Section("").Key("INTS").ValidInts(",") -vals = cfg.Section("").Key("INT64S").ValidInt64s(",") -vals = cfg.Section("").Key("UINTS").ValidUints(",") -vals = cfg.Section("").Key("UINT64S").ValidUint64s(",") -vals = cfg.Section("").Key("TIMES").ValidTimes(",") -``` - -当存在无效输入时,直接返回错误: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> error -vals = cfg.Section("").Key("FLOAT64S").StrictFloat64s(",") -vals = cfg.Section("").Key("INTS").StrictInts(",") -vals = cfg.Section("").Key("INT64S").StrictInt64s(",") -vals = cfg.Section("").Key("UINTS").StrictUints(",") -vals = cfg.Section("").Key("UINT64S").StrictUint64s(",") -vals = cfg.Section("").Key("TIMES").StrictTimes(",") -``` - -### 保存配置 - -终于到了这个时刻,是时候保存一下配置了。 - -比较原始的做法是输出配置到某个文件: - -```go -// ... -err = cfg.SaveTo("my.ini") -err = cfg.SaveToIndent("my.ini", "\t") -``` - -另一个比较高级的做法是写入到任何实现 `io.Writer` 接口的对象中: - -```go -// ... -cfg.WriteTo(writer) -cfg.WriteToIndent(writer, "\t") -``` - -默认情况下,空格将被用于对齐键值之间的等号以美化输出结果,以下代码可以禁用该功能: - -```go -ini.PrettyFormat = false -``` - -## 高级用法 - -### 递归读取键值 - -在获取所有键值的过程中,特殊语法 `%()s` 会被应用,其中 `` 可以是相同分区或者默认分区下的键名。字符串 `%()s` 会被相应的键值所替代,如果指定的键不存在,则会用空字符串替代。您可以最多使用 99 层的递归嵌套。 - -```ini -NAME = ini - -[author] -NAME = Unknwon -GITHUB = https://github.com/%(NAME)s - -[package] -FULL_NAME = github.com/go-ini/%(NAME)s -``` - -```go -cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon -cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini -``` - -### 读取父子分区 - -您可以在分区名称中使用 `.` 来表示两个或多个分区之间的父子关系。如果某个键在子分区中不存在,则会去它的父分区中再次寻找,直到没有父分区为止。 - -```ini -NAME = ini -VERSION = v1 -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -[package] -CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] -``` - -```go -cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1 -``` - -#### 获取上级父分区下的所有键名 - -```go -cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"] -``` - -### 无法解析的分区 - -如果遇到一些比较特殊的分区,它们不包含常见的键值对,而是没有固定格式的纯文本,则可以使用 `LoadOptions.UnparsableSections` 进行处理: - -```go -cfg, err := LoadSources(LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS] -<1> This slide has the fuel listed in the wrong units `)) - -body := cfg.Section("COMMENTS").Body() - -/* --- start --- -<1> This slide has the fuel listed in the wrong units ------- end --- */ -``` - -### 读取自增键名 - -如果数据源中的键名为 `-`,则认为该键使用了自增键名的特殊语法。计数器从 1 开始,并且分区之间是相互独立的。 - -```ini -[features] --: Support read/write comments of keys and sections --: Support auto-increment of key names --: Support load multiple files to overwrite key values -``` - -```go -cfg.Section("features").KeyStrings() // []{"#1", "#2", "#3"} -``` - -### 映射到结构 - -想要使用更加面向对象的方式玩转 INI 吗?好主意。 - -```ini -Name = Unknwon -age = 21 -Male = true -Born = 1993-01-01T20:17:05Z - -[Note] -Content = Hi is a good man! -Cities = HangZhou, Boston -``` - -```go -type Note struct { - Content string - Cities []string -} - -type Person struct { - Name string - Age int `ini:"age"` - Male bool - Born time.Time - Note - Created time.Time `ini:"-"` -} - -func main() { - cfg, err := ini.Load("path/to/ini") - // ... - p := new(Person) - err = cfg.MapTo(p) - // ... - - // 一切竟可以如此的简单。 - err = ini.MapTo(p, "path/to/ini") - // ... - - // 嗯哼?只需要映射一个分区吗? - n := new(Note) - err = cfg.Section("Note").MapTo(n) - // ... -} -``` - -结构的字段怎么设置默认值呢?很简单,只要在映射之前对指定字段进行赋值就可以了。如果键未找到或者类型错误,该值不会发生改变。 - -```go -// ... -p := &Person{ - Name: "Joe", -} -// ... -``` - -这样玩 INI 真的好酷啊!然而,如果不能还给我原来的配置文件,有什么卵用? - -### 从结构反射 - -可是,我有说不能吗? - -```go -type Embeded struct { - Dates []time.Time `delim:"|"` - Places []string `ini:"places,omitempty"` - None []int `ini:",omitempty"` -} - -type Author struct { - Name string `ini:"NAME"` - Male bool - Age int - GPA float64 - NeverMind string `ini:"-"` - *Embeded -} - -func main() { - a := &Author{"Unknwon", true, 21, 2.8, "", - &Embeded{ - []time.Time{time.Now(), time.Now()}, - []string{"HangZhou", "Boston"}, - []int{}, - }} - cfg := ini.Empty() - err = ini.ReflectFrom(cfg, a) - // ... -} -``` - -瞧瞧,奇迹发生了。 - -```ini -NAME = Unknwon -Male = true -Age = 21 -GPA = 2.8 - -[Embeded] -Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00 -places = HangZhou,Boston -``` - -#### 名称映射器(Name Mapper) - -为了节省您的时间并简化代码,本库支持类型为 [`NameMapper`](https://gowalker.org/gopkg.in/ini.v1#NameMapper) 的名称映射器,该映射器负责结构字段名与分区名和键名之间的映射。 - -目前有 2 款内置的映射器: - -- `AllCapsUnderscore`:该映射器将字段名转换至格式 `ALL_CAPS_UNDERSCORE` 后再去匹配分区名和键名。 -- `TitleUnderscore`:该映射器将字段名转换至格式 `title_underscore` 后再去匹配分区名和键名。 - -使用方法: - -```go -type Info struct{ - PackageName string -} - -func main() { - err = ini.MapToWithMapper(&Info{}, ini.TitleUnderscore, []byte("package_name=ini")) - // ... - - cfg, err := ini.Load([]byte("PACKAGE_NAME=ini")) - // ... - info := new(Info) - cfg.NameMapper = ini.AllCapsUnderscore - err = cfg.MapTo(info) - // ... -} -``` - -使用函数 `ini.ReflectFromWithMapper` 时也可应用相同的规则。 - -#### 值映射器(Value Mapper) - -值映射器允许使用一个自定义函数自动展开值的具体内容,例如:运行时获取环境变量: - -```go -type Env struct { - Foo string `ini:"foo"` -} - -func main() { - cfg, err := ini.Load([]byte("[env]\nfoo = ${MY_VAR}\n") - cfg.ValueMapper = os.ExpandEnv - // ... - env := &Env{} - err = cfg.Section("env").MapTo(env) -} -``` - -本例中,`env.Foo` 将会是运行时所获取到环境变量 `MY_VAR` 的值。 - -#### 映射/反射的其它说明 - -任何嵌入的结构都会被默认认作一个不同的分区,并且不会自动产生所谓的父子分区关联: - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child -} - -type Config struct { - City string - Parent -} -``` - -示例配置文件: - -```ini -City = Boston - -[Parent] -Name = Unknwon - -[Child] -Age = 21 -``` - -很好,但是,我就是要嵌入结构也在同一个分区。好吧,你爹是李刚! - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child `ini:"Parent"` -} - -type Config struct { - City string - Parent -} -``` - -示例配置文件: - -```ini -City = Boston - -[Parent] -Name = Unknwon -Age = 21 -``` - -## 获取帮助 - -- [API 文档](https://gowalker.org/gopkg.in/ini.v1) -- [创建工单](https://github.com/go-ini/ini/issues/new) - -## 常见问题 - -### 字段 `BlockMode` 是什么? - -默认情况下,本库会在您进行读写操作时采用锁机制来确保数据时间。但在某些情况下,您非常确定只进行读操作。此时,您可以通过设置 `cfg.BlockMode = false` 来将读操作提升大约 **50-70%** 的性能。 - -### 为什么要写另一个 INI 解析库? - -许多人都在使用我的 [goconfig](https://github.com/Unknwon/goconfig) 来完成对 INI 文件的操作,但我希望使用更加 Go 风格的代码。并且当您设置 `cfg.BlockMode = false` 时,会有大约 **10-30%** 的性能提升。 - -为了做出这些改变,我必须对 API 进行破坏,所以新开一个仓库是最安全的做法。除此之外,本库直接使用 `gopkg.in` 来进行版本化发布。(其实真相是导入路径更短了) 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 80afe7431..000000000 --- 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/ini.go b/vendor/github.com/go-ini/ini/ini.go deleted file mode 100644 index 68d73aa75..000000000 --- a/vendor/github.com/go-ini/ini/ini.go +++ /dev/null @@ -1,549 +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 provides INI file read and write functionality in Go. -package ini - -import ( - "bytes" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "regexp" - "runtime" - "strconv" - "strings" - "sync" - "time" -) - -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.25.4" -) - -// 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 - - // Explicitly write DEFAULT section header - DefaultHeader = false -) - -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) -} - -type bytesReadCloser struct { - reader io.Reader -} - -func (rc *bytesReadCloser) Read(p []byte) (n int, err error) { - return rc.reader.Read(p) -} - -func (rc *bytesReadCloser) Close() error { - return nil -} - -// 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 -} - -// File represents a combination of a or more INI file(s) in memory. -type File struct { - // Should make things safe, but sometimes doesn't matter. - BlockMode bool - // Make sure data is safe in multiple goroutines. - lock sync.RWMutex - - // Allow combination of multiple data sources. - dataSources []dataSource - // Actual data is stored here. - sections map[string]*Section - - // To keep data in order. - sectionList []string - - options LoadOptions - - 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, - } -} - -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 - // 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 - // Some INI formats allow group blocks that store a block of raw content that doesn't 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...) -} - -// 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 - } else 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 { - sections := make([]*Section, len(f.sectionList)) - for i := range f.sectionList { - sections[i] = f.Section(f.sectionList[i]) - } - return sections -} - -// 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() -} - -// 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) (n int64, err error) { - equalSign := "=" - if PrettyFormat { - 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 - } - if _, err = buf.WriteString(sec.Comment + LineBreak); err != nil { - return 0, err - } - } - - if i > 0 || DefaultHeader { - if _, err = buf.WriteString("[" + sname + "]" + LineBreak); err != nil { - return 0, 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 0, 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 - } - if _, err = buf.WriteString(key.Comment + LineBreak); err != nil { - return 0, 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 0, 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 strings.ContainsAny(val, "#;") { - val = "`" + val + "`" - } - if _, err = buf.WriteString(equalSign + val + LineBreak); err != nil { - return 0, err - } - } - } - - // Put a line between sections - if _, err = buf.WriteString(LineBreak); 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. - tmpPath := filename + "." + strconv.Itoa(time.Now().Nanosecond()) + ".tmp" - defer os.Remove(tmpPath) - - fw, err := os.Create(tmpPath) - if err != nil { - return err - } - - if _, err = f.WriteToIndent(fw, indent); err != nil { - fw.Close() - return err - } - fw.Close() - - // Remove old file and rename the new one. - os.Remove(filename) - return os.Rename(tmpPath, filename) -} - -// 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/key.go b/vendor/github.com/go-ini/ini/key.go deleted file mode 100644 index 852696f4c..000000000 --- a/vendor/github.com/go-ini/ini/key.go +++ /dev/null @@ -1,703 +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" - "strconv" - "strings" - "time" -) - -// Key represents a key under a section. -type Key struct { - s *Section - name string - value string - isAutoIncrement bool - isBooleanType bool - - isShadow bool - shadows []*Key - - Comment 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) -} - -// 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 -} - -// 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 { - // 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{} - } - - vals := strings.Split(str, delim) - for i := range vals { - // vals[i] = k.transformValue(strings.TrimSpace(vals[i])) - vals[i] = strings.TrimSpace(vals[i]) - } - 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.getFloat64s(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.getUints(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.getUint64s(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.getTimesFormat(format, 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.getFloat64s(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.getUints(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.getUint64s(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.getTimesFormat(format, 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.getFloat64s(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.getUints(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.getUint64s(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.getTimesFormat(format, 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) -} - -// getFloat64s returns list of float64 divided by given delimiter. -func (k *Key) getFloat64s(delim string, addInvalid, returnOnInvalid bool) ([]float64, error) { - strs := k.Strings(delim) - 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 -} - -// getUints returns list of uint divided by given delimiter. -func (k *Key) getUints(delim string, addInvalid, returnOnInvalid bool) ([]uint, error) { - strs := k.Strings(delim) - 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 -} - -// getUint64s returns list of uint64 divided by given delimiter. -func (k *Key) getUint64s(delim string, addInvalid, returnOnInvalid bool) ([]uint64, error) { - strs := k.Strings(delim) - 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 -} - -// getTimesFormat parses with given format and returns list of time.Time divided by given delimiter. -func (k *Key) getTimesFormat(format, delim string, addInvalid, returnOnInvalid bool) ([]time.Time, error) { - strs := k.Strings(delim) - 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 673ef80ca..000000000 --- a/vendor/github.com/go-ini/ini/parser.go +++ /dev/null @@ -1,358 +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" - "strconv" - "strings" - "unicode" -) - -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, ignoreContinuation 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 = "`" - } - - 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) - } - - return line[startIdx : pos+startIdx], nil - } - - // Won't be able to reach here if value only contains whitespace. - line = strings.TrimSpace(line) - - // Check continuation lines when desired. - if !ignoreContinuation && line[len(line)-1] == '\\' { - return p.readContinuationLines(line[:len(line)-1]) - } - - i := strings.IndexAny(line, "#;") - if i > -1 { - p.comment.WriteString(line[i:]) - line = strings.TrimSpace(line[:i]) - } - - // Trim single quotes - if hasSurroundedQuote(line, '\'') || - hasSurroundedQuote(line, '"') { - line = line[1 : len(line)-1] - } - 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. - section, _ := f.NewSection(DEFAULT_SECTION) - - var line []byte - var inUnparseableSection bool - for !p.isEOF { - line, err = p.readUntil('\n') - if err != nil { - return err - } - - 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) - // TODO(unknwon): use LastIndexByte when stop supporting Go1.4 - closeIdx := bytes.LastIndex(line, []byte("]")) - 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) && f.options.AllowBooleanKeys { - kname, err := p.readValue(line, f.options.IgnoreContinuation) - 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 - } - return err - } - - // Auto increment. - isAutoIncr := false - if kname == "-" { - isAutoIncr = true - kname = "#" + strconv.Itoa(p.count) - p.count++ - } - - value, err := p.readValue(line[offset:], f.options.IgnoreContinuation) - if err != nil { - return err - } - - key, err := section.NewKey(kname, value) - if err != nil { - return err - } - key.isAutoIncrement = isAutoIncr - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - } - 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 c9fa27e9c..000000000 --- a/vendor/github.com/go-ini/ini/section.go +++ /dev/null @@ -1,234 +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) -} - -// 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 - } - 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. -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 - } - } -} 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 509c682fa..000000000 --- a/vendor/github.com/go-ini/ini/struct.go +++ /dev/null @@ -1,450 +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 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{} - - sliceOf := field.Type().Elem().Kind() - switch sliceOf { - case reflect.String: - vals = strs - case reflect.Int: - vals, _ = key.parseInts(strs, true, false) - case reflect.Int64: - vals, _ = key.parseInt64s(strs, true, false) - case reflect.Uint: - vals = key.Uints(delim) - case reflect.Uint64: - vals = key.Uint64s(delim) - case reflect.Float64: - vals = key.Float64s(delim) - case reflectTime: - vals = key.Times(delim) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - - 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 -} - -// 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 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 nil - } - field.SetBool(boolVal) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - durationVal, err := key.Duration() - // Skip zero value - if err == nil && int(durationVal) > 0 { - field.Set(reflect.ValueOf(durationVal)) - return nil - } - - intVal, err := key.Int64() - if err != nil || intVal == 0 { - return nil - } - 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 nil - } - field.SetUint(uintVal) - - case reflect.Float32, reflect.Float64: - floatVal, err := key.Float64() - if err != nil { - return nil - } - field.SetFloat(floatVal) - case reflectTime: - timeVal, err := key.Time() - if err != nil { - return nil - } - field.Set(reflect.ValueOf(timeVal)) - case reflect.Slice: - return setSliceWithProperType(key, field, delim, allowShadow) - 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) 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); 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); 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) -} - -// MapTo maps file to given struct. -func (f *File) MapTo(v interface{}) error { - return f.Section("").MapTo(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) -} - -// MapTo maps data sources to given struct. -func MapTo(v, source interface{}, others ...interface{}) error { - return MapToWithMapper(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 reflectTime: - return v.Interface().(time.Time).IsZero() - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - 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) - } - 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, "") - } - 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 9cfa988bc..8e26ffeec 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 577ee2241..d94eb4a94 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 ae3cfa242..7c944b923 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 3e554ea9e..f22141895 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)) @@ -524,7 +524,7 @@ 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()) } @@ -1259,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 2960400fe..fa9b8354c 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 @@ -19,6 +19,7 @@ import ( "github.com/aws/aws-sdk-go/service/acmpca" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/applicationautoscaling" + "github.com/aws/aws-sdk-go/service/appmesh" "github.com/aws/aws-sdk-go/service/appsync" "github.com/aws/aws-sdk-go/service/athena" "github.com/aws/aws-sdk-go/service/autoscaling" @@ -40,10 +41,12 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/aws/aws-sdk-go/service/datasync" "github.com/aws/aws-sdk-go/service/dax" "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" @@ -67,6 +70,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" @@ -84,6 +88,7 @@ import ( "github.com/aws/aws-sdk-go/service/route53" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/aws/aws-sdk-go/service/securityhub" "github.com/aws/aws-sdk-go/service/servicecatalog" "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/aws/aws-sdk-go/service/ses" @@ -95,6 +100,7 @@ import ( "github.com/aws/aws-sdk-go/service/storagegateway" "github.com/aws/aws-sdk-go/service/sts" "github.com/aws/aws-sdk-go/service/swf" + "github.com/aws/aws-sdk-go/service/transfer" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" "github.com/aws/aws-sdk-go/service/workspaces" @@ -138,6 +144,7 @@ type Config struct { ElbEndpoint string IamEndpoint string KinesisEndpoint string + KinesisAnalyticsEndpoint string KmsEndpoint string LambdaEndpoint string RdsEndpoint string @@ -169,8 +176,10 @@ type AWSClient struct { cognitoconn *cognitoidentity.CognitoIdentity cognitoidpconn *cognitoidentityprovider.CognitoIdentityProvider configconn *configservice.ConfigService + datasyncconn *datasync.DataSync daxconn *dax.DAX devicefarmconn *devicefarm.DeviceFarm + dlmconn *dlm.DLM dmsconn *databasemigrationservice.DatabaseMigrationService dsconn *directoryservice.DirectoryService dynamodbconn *dynamodb.DynamoDB @@ -190,6 +199,7 @@ type AWSClient struct { autoscalingconn *autoscaling.AutoScaling s3conn *s3.S3 secretsmanagerconn *secretsmanager.SecretsManager + securityhubconn *securityhub.SecurityHub scconn *servicecatalog.ServiceCatalog sesConn *ses.SES simpledbconn *simpledb.SimpleDB @@ -205,6 +215,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 @@ -245,6 +256,8 @@ type AWSClient struct { pricingconn *pricing.Pricing pinpointconn *pinpoint.Pinpoint workspacesconn *workspaces.WorkSpaces + appmeshconn *appmesh.AppMesh + transferconn *transfer.Transfer } func (c *AWSClient) S3() *s3.S3 { @@ -380,13 +393,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) } @@ -416,6 +429,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)}) @@ -513,7 +527,9 @@ func (c *Config) Client() (interface{}, error) { client.cognitoconn = cognitoidentity.New(sess) client.cognitoidpconn = cognitoidentityprovider.New(sess) client.codepipelineconn = codepipeline.New(sess) + client.datasyncconn = datasync.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) @@ -536,6 +552,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) @@ -554,6 +571,7 @@ func (c *Config) Client() (interface{}, error) { client.sdconn = servicediscovery.New(sess) client.sesConn = ses.New(sess) client.secretsmanagerconn = secretsmanager.New(sess) + client.securityhubconn = securityhub.New(sess) client.sfnconn = sfn.New(sess) client.snsconn = sns.New(awsSnsSess) client.sqsconn = sqs.New(awsSqsSess) @@ -572,6 +590,8 @@ func (c *Config) Client() (interface{}, error) { client.pricingconn = pricing.New(sess) client.pinpointconn = pinpoint.New(sess) client.workspacesconn = workspaces.New(sess) + client.appmeshconn = appmesh.New(sess) + client.transferconn = transfer.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 be10fbf55..f5b8a01d0 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, false)[0] + return amiDescriptionAttributes(d, filteredImages[0]) } // populate the numerous fields that the image description returns. 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 806bcd868..e75df9c73 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" @@ -129,7 +131,15 @@ func dataSourceAwsAmiIdsRead(d *schema.ResourceData, meta interface{}) error { filteredImages = resp.Images[:] } - for _, image := range sortImages(filteredImages, sortAscending) { + 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 000000000..e9a7d7a97 --- /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_api_gateway_vpc_link.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_vpc_link.go new file mode 100644 index 000000000..7ce38d711 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_vpc_link.go @@ -0,0 +1,62 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsApiGatewayVpcLink() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsApiGatewayVpcLinkRead, + + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + + "name": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func dataSourceAwsApiGatewayVpcLinkRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + params := &apigateway.GetVpcLinksInput{} + + target := d.Get("name") + var matchedVpcLinks []*apigateway.UpdateVpcLinkOutput + log.Printf("[DEBUG] Reading API Gateway VPC links: %s", params) + err := conn.GetVpcLinksPages(params, func(page *apigateway.GetVpcLinksOutput, lastPage bool) bool { + for _, api := range page.Items { + if aws.StringValue(api.Name) == target { + matchedVpcLinks = append(matchedVpcLinks, api) + } + } + return !lastPage + }) + if err != nil { + return fmt.Errorf("error describing API Gateway VPC links: %s", err) + } + + if len(matchedVpcLinks) == 0 { + return fmt.Errorf("no API Gateway VPC link with name %q found in this region", target) + } + if len(matchedVpcLinks) > 1 { + return fmt.Errorf("multiple API Gateway VPC links with name %q found in this region", target) + } + + match := matchedVpcLinks[0] + + d.SetId(*match.Id) + d.Set("name", match.Name) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go index 2d872b133..bc660cfdb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go @@ -35,6 +35,12 @@ func dataSourceAwsAvailabilityZone() *schema.Resource { Optional: true, Computed: true, }, + + "zone_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, }, } } @@ -44,10 +50,12 @@ func dataSourceAwsAvailabilityZoneRead(d *schema.ResourceData, meta interface{}) req := &ec2.DescribeAvailabilityZonesInput{} - if name := d.Get("name"); name != "" { - req.ZoneNames = []*string{aws.String(name.(string))} + if v := d.Get("name").(string); v != "" { + req.ZoneNames = []*string{aws.String(v)} + } + if v := d.Get("zone_id").(string); v != "" { + req.ZoneIds = []*string{aws.String(v)} } - req.Filters = buildEC2AttributeFilterList( map[string]string{ "state": d.Get("state").(string), @@ -78,11 +86,12 @@ func dataSourceAwsAvailabilityZoneRead(d *schema.ResourceData, meta interface{}) // work regardless of region. nameSuffix := (*az.ZoneName)[len(*az.RegionName):] - d.SetId(*az.ZoneName) + d.SetId(aws.StringValue(az.ZoneName)) d.Set("name", az.ZoneName) d.Set("name_suffix", nameSuffix) d.Set("region", az.RegionName) d.Set("state", az.State) + d.Set("zone_id", az.ZoneId) 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 3d033de6d..ef15bd0e0 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 @@ -32,6 +32,11 @@ func dataSourceAwsAvailabilityZones() *schema.Resource { ec2.AvailabilityZoneStateUnavailable, }, false), }, + "zone_ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, } } @@ -59,15 +64,22 @@ func dataSourceAwsAvailabilityZonesRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("Error fetching Availability Zones: %s", err) } - raw := make([]string, len(resp.AvailabilityZones)) - for i, v := range resp.AvailabilityZones { - raw[i] = *v.ZoneName + sort.Slice(resp.AvailabilityZones, func(i, j int) bool { + return aws.StringValue(resp.AvailabilityZones[i].ZoneName) < aws.StringValue(resp.AvailabilityZones[j].ZoneName) + }) + + names := []string{} + zoneIds := []string{} + for _, v := range resp.AvailabilityZones { + names = append(names, aws.StringValue(v.ZoneName)) + zoneIds = append(zoneIds, aws.StringValue(v.ZoneId)) } - sort.Strings(raw) - - if err := d.Set("names", raw); err != nil { - return fmt.Errorf("Error setting Availability Zones: %s", err) + if err := d.Set("names", names); err != nil { + return fmt.Errorf("Error setting Availability Zone names: %s", err) + } + if err := d.Set("zone_ids", zoneIds); err != nil { + return fmt.Errorf("Error setting Availability Zone IDs: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go index 33574a033..cbc6e6daf 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go @@ -9,22 +9,24 @@ import ( // See http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html var cloudTrailServiceAccountPerRegionMap = map[string]string{ - "us-east-1": "086441151436", - "us-east-2": "475085895292", - "us-west-1": "388731089494", - "us-west-2": "113285607260", - "ap-south-1": "977081816279", + "ap-northeast-1": "216624486486", "ap-northeast-2": "492519147666", + "ap-northeast-3": "765225791966", + "ap-south-1": "977081816279", "ap-southeast-1": "903692715234", "ap-southeast-2": "284668455005", - "ap-northeast-1": "216624486486", "ca-central-1": "819402241893", + "cn-northwest-1": "681348832753", "eu-central-1": "035351147821", + "eu-north-1": "829690693026", "eu-west-1": "859597730677", "eu-west-2": "282025262664", "eu-west-3": "262312530599", "sa-east-1": "814480443879", - "cn-northwest-1": "681348832753", + "us-east-1": "086441151436", + "us-east-2": "475085895292", + "us-west-1": "388731089494", + "us-west-2": "113285607260", } func dataSourceAwsCloudTrailServiceAccount() *schema.Resource { 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 7b7cb29d2..cbcd941ec 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 65a8ab101..5041e25b3 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_ec2_transit_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway.go new file mode 100644 index 000000000..b44fc13c8 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway.go @@ -0,0 +1,130 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsEc2TransitGateway() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2TransitGatewayRead, + + Schema: map[string]*schema.Schema{ + "amazon_side_asn": { + Type: schema.TypeInt, + Computed: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "association_default_route_table_id": { + Type: schema.TypeString, + Computed: true, + }, + "auto_accept_shared_attachments": { + Type: schema.TypeString, + Computed: true, + }, + "default_route_table_association": { + Type: schema.TypeString, + Computed: true, + }, + "default_route_table_propagation": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "dns_support": { + Type: schema.TypeString, + Computed: true, + }, + "filter": dataSourceFiltersSchema(), + "id": { + Type: schema.TypeString, + Optional: true, + }, + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, + "propagation_default_route_table_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + "vpn_ecmp_support": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsEc2TransitGatewayRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DescribeTransitGatewaysInput{} + + if v, ok := d.GetOk("filter"); ok { + input.Filters = buildAwsDataSourceFilters(v.(*schema.Set)) + } + + if v, ok := d.GetOk("id"); ok { + input.TransitGatewayIds = []*string{aws.String(v.(string))} + } + + log.Printf("[DEBUG] Reading EC2 Transit Gateways: %s", input) + output, err := conn.DescribeTransitGateways(input) + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway: %s", err) + } + + if output == nil || len(output.TransitGateways) == 0 { + return errors.New("error reading EC2 Transit Gateway: no results found") + } + + if len(output.TransitGateways) > 1 { + return errors.New("error reading EC2 Transit Gateway: multiple results found, try adjusting search criteria") + } + + transitGateway := output.TransitGateways[0] + + if transitGateway == nil { + return errors.New("error reading EC2 Transit Gateway: empty result") + } + + if transitGateway.Options == nil { + return errors.New("error reading EC2 Transit Gateway: missing options") + } + + d.Set("amazon_side_asn", aws.Int64Value(transitGateway.Options.AmazonSideAsn)) + d.Set("arn", transitGateway.TransitGatewayArn) + d.Set("association_default_route_table_id", transitGateway.Options.AssociationDefaultRouteTableId) + d.Set("auto_accept_shared_attachments", transitGateway.Options.AutoAcceptSharedAttachments) + d.Set("default_route_table_association", transitGateway.Options.DefaultRouteTableAssociation) + d.Set("default_route_table_propagation", transitGateway.Options.DefaultRouteTablePropagation) + d.Set("description", transitGateway.Description) + d.Set("dns_support", transitGateway.Options.DnsSupport) + d.Set("owner_id", transitGateway.OwnerId) + d.Set("propagation_default_route_table_id", transitGateway.Options.PropagationDefaultRouteTableId) + + if err := d.Set("tags", tagsToMap(transitGateway.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("vpn_ecmp_support", transitGateway.Options.VpnEcmpSupport) + + d.SetId(aws.StringValue(transitGateway.TransitGatewayId)) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_route_table.go new file mode 100644 index 000000000..a011de02f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_route_table.go @@ -0,0 +1,86 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsEc2TransitGatewayRouteTable() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2TransitGatewayRouteTableRead, + + Schema: map[string]*schema.Schema{ + "default_association_route_table": { + Type: schema.TypeBool, + Computed: true, + }, + "default_propagation_route_table": { + Type: schema.TypeBool, + Computed: true, + }, + "filter": dataSourceFiltersSchema(), + "id": { + Type: schema.TypeString, + Optional: true, + }, + "transit_gateway_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + }, + } +} + +func dataSourceAwsEc2TransitGatewayRouteTableRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DescribeTransitGatewayRouteTablesInput{} + + if v, ok := d.GetOk("filter"); ok { + input.Filters = buildAwsDataSourceFilters(v.(*schema.Set)) + } + + if v, ok := d.GetOk("id"); ok { + input.TransitGatewayRouteTableIds = []*string{aws.String(v.(string))} + } + + log.Printf("[DEBUG] Reading EC2 Transit Gateways: %s", input) + output, err := conn.DescribeTransitGatewayRouteTables(input) + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Route Table: %s", err) + } + + if output == nil || len(output.TransitGatewayRouteTables) == 0 { + return errors.New("error reading EC2 Transit Gateway Route Table: no results found") + } + + if len(output.TransitGatewayRouteTables) > 1 { + return errors.New("error reading EC2 Transit Gateway Route Table: multiple results found, try adjusting search criteria") + } + + transitGatewayRouteTable := output.TransitGatewayRouteTables[0] + + if transitGatewayRouteTable == nil { + return errors.New("error reading EC2 Transit Gateway Route Table: empty result") + } + + d.Set("default_association_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultAssociationRouteTable)) + d.Set("default_propagation_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultPropagationRouteTable)) + + if err := d.Set("tags", tagsToMap(transitGatewayRouteTable.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("transit_gateway_id", aws.StringValue(transitGatewayRouteTable.TransitGatewayId)) + + d.SetId(aws.StringValue(transitGatewayRouteTable.TransitGatewayRouteTableId)) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go new file mode 100644 index 000000000..e28ef0986 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go @@ -0,0 +1,109 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsEc2TransitGatewayVpcAttachment() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2TransitGatewayVpcAttachmentRead, + + Schema: map[string]*schema.Schema{ + "dns_support": { + Type: schema.TypeString, + Computed: true, + }, + "filter": dataSourceFiltersSchema(), + "id": { + Type: schema.TypeString, + Optional: true, + }, + "ipv6_support": { + Type: schema.TypeString, + Computed: true, + }, + "subnet_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "transit_gateway_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_owner_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsEc2TransitGatewayVpcAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DescribeTransitGatewayVpcAttachmentsInput{} + + if v, ok := d.GetOk("filter"); ok { + input.Filters = buildAwsDataSourceFilters(v.(*schema.Set)) + } + + if v, ok := d.GetOk("id"); ok { + input.TransitGatewayAttachmentIds = []*string{aws.String(v.(string))} + } + + log.Printf("[DEBUG] Reading EC2 Transit Gateways: %s", input) + output, err := conn.DescribeTransitGatewayVpcAttachments(input) + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Route Table: %s", err) + } + + if output == nil || len(output.TransitGatewayVpcAttachments) == 0 { + return errors.New("error reading EC2 Transit Gateway Route Table: no results found") + } + + if len(output.TransitGatewayVpcAttachments) > 1 { + return errors.New("error reading EC2 Transit Gateway Route Table: multiple results found, try adjusting search criteria") + } + + transitGatewayVpcAttachment := output.TransitGatewayVpcAttachments[0] + + if transitGatewayVpcAttachment == nil { + return errors.New("error reading EC2 Transit Gateway Route Table: empty result") + } + + if transitGatewayVpcAttachment.Options == nil { + return fmt.Errorf("error reading EC2 Transit Gateway VPC Attachment (%s): missing options", d.Id()) + } + + d.Set("dns_support", transitGatewayVpcAttachment.Options.DnsSupport) + d.Set("ipv6_support", transitGatewayVpcAttachment.Options.Ipv6Support) + + if err := d.Set("subnet_ids", aws.StringValueSlice(transitGatewayVpcAttachment.SubnetIds)); err != nil { + return fmt.Errorf("error setting subnet_ids: %s", err) + } + + if err := d.Set("tags", tagsToMap(transitGatewayVpcAttachment.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("transit_gateway_id", aws.StringValue(transitGatewayVpcAttachment.TransitGatewayId)) + d.Set("vpc_id", aws.StringValue(transitGatewayVpcAttachment.VpcId)) + d.Set("vpc_owner_id", aws.StringValue(transitGatewayVpcAttachment.VpcOwnerId)) + + d.SetId(aws.StringValue(transitGatewayVpcAttachment.TransitGatewayAttachmentId)) + + return nil +} 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 7665c12e9..9f35dab93 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,6 +5,7 @@ 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/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -15,6 +16,10 @@ func dataSourceAwsEfsFileSystem() *schema.Resource { Read: dataSourceAwsEfsFileSystemRead, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "creation_token": { Type: schema.TypeString, Optional: true, @@ -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 21d40f128..88e4dcf88 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,6 +5,7 @@ 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/terraform/helper/schema" ) @@ -19,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, @@ -71,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) 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 f461a374e..fe650108b 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_elb_hosted_zone_id.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_hosted_zone_id.go index 6bcf74bdf..3fec3f2ea 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_hosted_zone_id.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_hosted_zone_id.go @@ -10,21 +10,23 @@ import ( var elbHostedZoneIdPerRegionMap = map[string]string{ "ap-northeast-1": "Z14GRHDCWA56QT", "ap-northeast-2": "ZWKZPGTI48KDX", + "ap-northeast-3": "Z5LXEXXYW11ES", "ap-south-1": "ZP97RAFLXTNZK", "ap-southeast-1": "Z1LMS91P8CMLE5", "ap-southeast-2": "Z1GM3OXH4ZPM65", "ca-central-1": "ZQSVJUPU6J1EY", + "cn-north-1": "638102146993", "eu-central-1": "Z215JYRZR1TBD5", + "eu-north-1": "Z23TAZ6LKFMNIO", "eu-west-1": "Z32O12XQLNTSW2", "eu-west-2": "ZHURV8PSTC4K8", "eu-west-3": "Z3Q77PNBQS71R4", + "sa-east-1": "Z2P70J7HTTTPLU", "us-east-1": "Z35SXDOTRQ7X7K", "us-east-2": "Z3AADJGX6KTTL2", + "us-gov-west-1": "048591011584", "us-west-1": "Z368ELLRRE2KJ0", "us-west-2": "Z1H1FL5HABSF5", - "sa-east-1": "Z2P70J7HTTTPLU", - "us-gov-west-1": "048591011584", - "cn-north-1": "638102146993", } func dataSourceAwsElbHostedZoneId() *schema.Resource { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go index 639ad7339..8565c8e18 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go @@ -11,6 +11,7 @@ import ( var elbAccountIdPerRegionMap = map[string]string{ "ap-northeast-1": "582318560864", "ap-northeast-2": "600734575887", + "ap-northeast-3": "383597477331", "ap-south-1": "718504428378", "ap-southeast-1": "114774131450", "ap-southeast-2": "783225319266", @@ -18,12 +19,14 @@ var elbAccountIdPerRegionMap = map[string]string{ "cn-north-1": "638102146993", "cn-northwest-1": "037604701340", "eu-central-1": "054676820928", + "eu-north-1": "897822967062", "eu-west-1": "156460612806", "eu-west-2": "652711504416", "eu-west-3": "009996457667", "sa-east-1": "507241528517", "us-east-1": "127311923021", "us-east-2": "033677994240", + "us-gov-east-1": "190560391635", "us-gov-west-1": "048591011584", "us-west-1": "027434742980", "us-west-2": "797873946194", 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 776dbe19d..8e9ce8cc8 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 @@ -2,6 +2,7 @@ package aws import ( "encoding/json" + "fmt" "strconv" "strings" @@ -84,6 +85,15 @@ func dataSourceAwsIamPolicyDocument() *schema.Resource { }, }, }, + "version": { + Type: schema.TypeString, + Optional: true, + Default: "2012-10-17", + ValidateFunc: validation.StringInSlice([]string{ + "2008-10-17", + "2012-10-17", + }, false), + }, "json": { Type: schema.TypeString, Computed: true, @@ -103,9 +113,9 @@ func dataSourceAwsIamPolicyDocumentRead(d *schema.ResourceData, meta interface{} } // process the current document - doc := &IAMPolicyDoc{} - - doc.Version = "2012-10-17" + doc := &IAMPolicyDoc{ + Version: d.Get("version").(string), + } if policyID, hasPolicyID := d.GetOk("policy_id"); hasPolicyID { doc.Id = policyID.(string) @@ -114,6 +124,8 @@ func dataSourceAwsIamPolicyDocumentRead(d *schema.ResourceData, meta interface{} if cfgStmts, hasCfgStmts := d.GetOk("statement"); hasCfgStmts { var cfgStmtIntf = cfgStmts.([]interface{}) stmts := make([]*IAMPolicyStatement, len(cfgStmtIntf)) + sidMap := make(map[string]struct{}) + for i, stmtI := range cfgStmtIntf { cfgStmt := stmtI.(map[string]interface{}) stmt := &IAMPolicyStatement{ @@ -121,7 +133,13 @@ func dataSourceAwsIamPolicyDocumentRead(d *schema.ResourceData, meta interface{} } if sid, ok := cfgStmt["sid"]; ok { + if _, ok := sidMap[sid.(string)]; ok { + return fmt.Errorf("Found duplicate sid (%s). Either remove the sid or ensure the sid is unique across all statements.", sid.(string)) + } stmt.Sid = sid.(string) + if len(stmt.Sid) > 0 { + sidMap[stmt.Sid] = struct{}{} + } } if actions := cfgStmt["actions"].(*schema.Set).List(); len(actions) > 0 { @@ -132,26 +150,46 @@ func dataSourceAwsIamPolicyDocumentRead(d *schema.ResourceData, meta interface{} } if resources := cfgStmt["resources"].(*schema.Set).List(); len(resources) > 0 { - stmt.Resources = dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList(resources), + var err error + stmt.Resources, err = dataSourceAwsIamPolicyDocumentReplaceVarsInList( + iamPolicyDecodeConfigStringList(resources), doc.Version, ) + if err != nil { + return fmt.Errorf("error reading resources: %s", err) + } } - if resources := cfgStmt["not_resources"].(*schema.Set).List(); len(resources) > 0 { - stmt.NotResources = dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList(resources), + if notResources := cfgStmt["not_resources"].(*schema.Set).List(); len(notResources) > 0 { + var err error + stmt.NotResources, err = dataSourceAwsIamPolicyDocumentReplaceVarsInList( + iamPolicyDecodeConfigStringList(notResources), doc.Version, ) + if err != nil { + return fmt.Errorf("error reading not_resources: %s", err) + } } if principals := cfgStmt["principals"].(*schema.Set).List(); len(principals) > 0 { - stmt.Principals = dataSourceAwsIamPolicyDocumentMakePrincipals(principals) + var err error + stmt.Principals, err = dataSourceAwsIamPolicyDocumentMakePrincipals(principals, doc.Version) + if err != nil { + return fmt.Errorf("error reading principals: %s", err) + } } - if principals := cfgStmt["not_principals"].(*schema.Set).List(); len(principals) > 0 { - stmt.NotPrincipals = dataSourceAwsIamPolicyDocumentMakePrincipals(principals) + if notPrincipals := cfgStmt["not_principals"].(*schema.Set).List(); len(notPrincipals) > 0 { + var err error + stmt.NotPrincipals, err = dataSourceAwsIamPolicyDocumentMakePrincipals(notPrincipals, doc.Version) + if err != nil { + return fmt.Errorf("error reading not_principals: %s", err) + } } if conditions := cfgStmt["condition"].(*schema.Set).List(); len(conditions) > 0 { - stmt.Conditions = dataSourceAwsIamPolicyDocumentMakeConditions(conditions) + var err error + stmt.Conditions, err = dataSourceAwsIamPolicyDocumentMakeConditions(conditions, doc.Version) + if err != nil { + return fmt.Errorf("error reading condition: %s", err) + } } stmts[i] = stmt @@ -187,52 +225,66 @@ func dataSourceAwsIamPolicyDocumentRead(d *schema.ResourceData, meta interface{} return nil } -func dataSourceAwsIamPolicyDocumentReplaceVarsInList(in interface{}) interface{} { +func dataSourceAwsIamPolicyDocumentReplaceVarsInList(in interface{}, version string) (interface{}, error) { switch v := in.(type) { case string: - return dataSourceAwsIamPolicyDocumentVarReplacer.Replace(v) + if version == "2008-10-17" && strings.Contains(v, "&{") { + return nil, fmt.Errorf("found &{ sequence in (%s), which is not supported in document version 2008-10-17", v) + } + return dataSourceAwsIamPolicyDocumentVarReplacer.Replace(v), nil case []string: out := make([]string, len(v)) for i, item := range v { + if version == "2008-10-17" && strings.Contains(item, "&{") { + return nil, fmt.Errorf("found &{ sequence in (%s), which is not supported in document version 2008-10-17", item) + } out[i] = dataSourceAwsIamPolicyDocumentVarReplacer.Replace(item) } - return out + return out, nil default: panic("dataSourceAwsIamPolicyDocumentReplaceVarsInList: input not string nor []string") } } -func dataSourceAwsIamPolicyDocumentMakeConditions(in []interface{}) IAMPolicyStatementConditionSet { +func dataSourceAwsIamPolicyDocumentMakeConditions(in []interface{}, version string) (IAMPolicyStatementConditionSet, error) { out := make([]IAMPolicyStatementCondition, len(in)) for i, itemI := range in { + var err error item := itemI.(map[string]interface{}) out[i] = IAMPolicyStatementCondition{ Test: item["test"].(string), Variable: item["variable"].(string), - Values: dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList( - item["values"].(*schema.Set).List(), - ), - ), + } + out[i].Values, err = dataSourceAwsIamPolicyDocumentReplaceVarsInList( + iamPolicyDecodeConfigStringList( + item["values"].(*schema.Set).List(), + ), version, + ) + if err != nil { + return nil, fmt.Errorf("error reading values: %s", err) } } - return IAMPolicyStatementConditionSet(out) + return IAMPolicyStatementConditionSet(out), nil } -func dataSourceAwsIamPolicyDocumentMakePrincipals(in []interface{}) IAMPolicyStatementPrincipalSet { +func dataSourceAwsIamPolicyDocumentMakePrincipals(in []interface{}, version string) (IAMPolicyStatementPrincipalSet, error) { out := make([]IAMPolicyStatementPrincipal, len(in)) for i, itemI := range in { + var err error item := itemI.(map[string]interface{}) out[i] = IAMPolicyStatementPrincipal{ Type: item["type"].(string), - Identifiers: dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList( - item["identifiers"].(*schema.Set).List(), - ), - ), + } + out[i].Identifiers, err = dataSourceAwsIamPolicyDocumentReplaceVarsInList( + iamPolicyDecodeConfigStringList( + item["identifiers"].(*schema.Set).List(), + ), version, + ) + if err != nil { + return nil, fmt.Errorf("error reading identifiers: %s", err) } } - return IAMPolicyStatementPrincipalSet(out) + return IAMPolicyStatementPrincipalSet(out), nil } func dataSourceAwsIamPolicyPrincipalSchema() *schema.Schema { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go index 0c49381cb..080211b98 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go @@ -51,6 +51,10 @@ func dataSourceAwsInstance() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "host_id": { + Type: schema.TypeString, + Computed: true, + }, "key_name": { Type: schema.TypeString, Computed: true, @@ -349,6 +353,9 @@ func instanceDescriptionAttributes(d *schema.ResourceData, instance *ec2.Instanc if instance.Placement.Tenancy != nil { d.Set("tenancy", instance.Placement.Tenancy) } + if instance.Placement.HostId != nil { + d.Set("host_id", instance.Placement.HostId) + } d.Set("ami", instance.ImageId) d.Set("instance_type", instance.InstanceType) d.Set("key_name", instance.KeyName) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go index 2c3184577..541c6e380 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go @@ -36,6 +36,10 @@ func dataSourceAwsInternetGateway() *schema.Resource { }, }, }, + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -77,6 +81,7 @@ func dataSourceAwsInternetGatewayRead(d *schema.ResourceData, meta interface{}) igw := resp.InternetGateways[0] d.SetId(aws.StringValue(igw.InternetGatewayId)) d.Set("tags", tagsToMap(igw.Tags)) + d.Set("owner_id", igw.OwnerId) d.Set("internet_gateway_id", igw.InternetGatewayId) if err := d.Set("attachments", dataSourceAttachmentsRead(igw.Attachments)); err != nil { return err 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 e9938bf8e..2c5e94372 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_ip_ranges.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ip_ranges.go index aec2529e1..3706ec8ba 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ip_ranges.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ip_ranges.go @@ -65,6 +65,11 @@ func dataSourceAwsIPRanges() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "url": { + Type: schema.TypeString, + Optional: true, + Default: "https://ip-ranges.amazonaws.com/ip-ranges.json", + }, }, } } @@ -72,13 +77,14 @@ func dataSourceAwsIPRanges() *schema.Resource { func dataSourceAwsIPRangesRead(d *schema.ResourceData, meta interface{}) error { conn := cleanhttp.DefaultClient() + url := d.Get("url").(string) - log.Printf("[DEBUG] Reading IP ranges") + log.Printf("[DEBUG] Reading IP ranges from %s", url) - res, err := conn.Get("https://ip-ranges.amazonaws.com/ip-ranges.json") + res, err := conn.Get(url) if err != nil { - return fmt.Errorf("Error listing IP ranges: %s", err) + return fmt.Errorf("Error listing IP ranges from (%s): %s", url, err) } defer res.Body.Close() @@ -86,13 +92,13 @@ func dataSourceAwsIPRangesRead(d *schema.ResourceData, meta interface{}) error { data, err := ioutil.ReadAll(res.Body) if err != nil { - return fmt.Errorf("Error reading response body: %s", err) + return fmt.Errorf("Error reading response body from (%s): %s", url, err) } result := new(dataSourceAwsIPRangesResult) if err := json.Unmarshal(data, result); err != nil { - return fmt.Errorf("Error parsing result: %s", err) + return fmt.Errorf("Error parsing result from (%s): %s", url, err) } if err := d.Set("create_date", result.CreateDate); err != nil { @@ -155,7 +161,7 @@ func dataSourceAwsIPRangesRead(d *schema.ResourceData, meta interface{}) error { } if len(ipPrefixes) == 0 && len(ipv6Prefixes) == 0 { - return fmt.Errorf("No IP ranges result from filters") + return fmt.Errorf("No IP ranges result from filters from (%s)", url) } sort.Strings(ipPrefixes) 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 0e54e0862..8ef6dfd20 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 @@ -54,6 +54,155 @@ func dataSourceAwsLbListener() *schema.Resource { Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "authenticate_cognito": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Computed: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Computed: true, + }, + "scope": { + Type: schema.TypeString, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Computed: true, + }, + "user_pool_arn": { + Type: schema.TypeString, + Computed: true, + }, + "user_pool_client_id": { + Type: schema.TypeString, + Computed: true, + }, + "user_pool_domain": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "authenticate_oidc": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Computed: true, + }, + "authorization_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "client_id": { + Type: schema.TypeString, + Computed: true, + }, + "client_secret": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + "issuer": { + Type: schema.TypeString, + Computed: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Computed: true, + }, + "scope": { + Type: schema.TypeString, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Computed: true, + }, + "token_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "user_info_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "fixed_response": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "content_type": { + Type: schema.TypeString, + Computed: true, + }, + "message_body": { + Type: schema.TypeString, + Computed: true, + }, + "status_code": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "order": { + Type: schema.TypeInt, + Computed: true, + }, + "redirect": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "host": { + Type: schema.TypeString, + Computed: true, + }, + "path": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeString, + Computed: true, + }, + "protocol": { + Type: schema.TypeString, + Computed: true, + }, + "query": { + Type: schema.TypeString, + Computed: true, + }, + "status_code": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, "target_group_arn": { Type: schema.TypeString, Computed: true, 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 fa150808c..0fe5ca6b6 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 98947f397..a80569447 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 858345770..51b91b49a 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_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go index 45bf35831..e85f12d07 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go @@ -47,6 +47,11 @@ func dataSourceAwsRoute() *schema.Resource { Optional: true, Computed: true, }, + "transit_gateway_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "vpc_peering_connection_id": { Type: schema.TypeString, Optional: true, @@ -105,6 +110,7 @@ func dataSourceAwsRouteRead(d *schema.ResourceData, meta interface{}) error { d.Set("gateway_id", route.GatewayId) d.Set("instance_id", route.InstanceId) d.Set("nat_gateway_id", route.NatGatewayId) + d.Set("transit_gateway_id", route.TransitGatewayId) d.Set("vpc_peering_connection_id", route.VpcPeeringConnectionId) d.Set("network_interface_id", route.NetworkInterfaceId) @@ -163,6 +169,12 @@ func getRoutes(table *ec2.RouteTable, d *schema.ResourceData) []*ec2.Route { } } + if v, ok := d.GetOk("transit_gateway_id"); ok { + if r.TransitGatewayId == nil || *r.TransitGatewayId != v.(string) { + continue + } + } + if v, ok := d.GetOk("vpc_peering_connection_id"); ok { if r.VpcPeeringConnectionId == nil || *r.VpcPeeringConnectionId != v.(string) { continue 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 000000000..117fefc00 --- /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_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_table.go index 79853a017..80751a531 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_table.go @@ -66,6 +66,11 @@ func dataSourceAwsRouteTable() *schema.Resource { Computed: true, }, + "transit_gateway_id": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_peering_connection_id": { Type: schema.TypeString, Computed: true, @@ -105,6 +110,10 @@ func dataSourceAwsRouteTable() *schema.Resource { }, }, }, + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -153,6 +162,7 @@ func dataSourceAwsRouteTableRead(d *schema.ResourceData, meta interface{}) error d.Set("route_table_id", rt.RouteTableId) d.Set("vpc_id", rt.VpcId) d.Set("tags", tagsToMap(rt.Tags)) + d.Set("owner_id", rt.OwnerId) if err := d.Set("routes", dataSourceRoutesRead(rt.Routes)); err != nil { return err } @@ -202,6 +212,9 @@ func dataSourceRoutesRead(ec2Routes []*ec2.Route) []map[string]interface{} { if r.InstanceId != nil { m["instance_id"] = *r.InstanceId } + if r.TransitGatewayId != nil { + m["transit_gateway_id"] = *r.TransitGatewayId + } if r.VpcPeeringConnectionId != nil { m["vpc_peering_connection_id"] = *r.VpcPeeringConnectionId } 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 000000000..6819233a4 --- /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_subnet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go index f8fffa264..e14b2612b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go @@ -5,7 +5,6 @@ import ( "log" "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" ) @@ -21,6 +20,12 @@ func dataSourceAwsSubnet() *schema.Resource { Computed: true, }, + "availability_zone_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "cidr_block": { Type: schema.TypeString, Optional: true, @@ -80,6 +85,11 @@ func dataSourceAwsSubnet() *schema.Resource { Type: schema.TypeString, Computed: true, }, + + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -104,10 +114,11 @@ func dataSourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { } filters := map[string]string{ - "availabilityZone": d.Get("availability_zone").(string), - "defaultForAz": defaultForAzStr, - "state": d.Get("state").(string), - "vpc-id": d.Get("vpc_id").(string), + "availabilityZone": d.Get("availability_zone").(string), + "availabilityZoneId": d.Get("availability_zone_id").(string), + "defaultForAz": defaultForAzStr, + "state": d.Get("state").(string), + "vpc-id": d.Get("vpc_id").(string), } if v, ok := d.GetOk("cidr_block"); ok { @@ -147,6 +158,7 @@ func dataSourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { d.SetId(*subnet.SubnetId) d.Set("vpc_id", subnet.VpcId) d.Set("availability_zone", subnet.AvailabilityZone) + d.Set("availability_zone_id", subnet.AvailabilityZoneId) d.Set("cidr_block", subnet.CidrBlock) d.Set("default_for_az", subnet.DefaultForAz) d.Set("state", subnet.State) @@ -161,14 +173,8 @@ func dataSourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { } } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "ec2", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("subnet/%s", d.Id()), - } - d.Set("arn", arn.String()) + d.Set("arn", subnet.SubnetArn) + d.Set("owner_id", subnet.OwnerId) return nil } 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 b2ad03d19..10db3e99f 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,28 +92,23 @@ func dataSourceAwsVpc() *schema.Resource { Computed: true, }, + "main_route_table_id": { + Type: schema.TypeString, + Computed: true, + }, + "state": { Type: schema.TypeString, Optional: true, Computed: true, }, - "enable_dns_hostnames": { - Type: schema.TypeBool, - Computed: true, - }, + "tags": tagsSchemaComputed(), - "enable_dns_support": { - Type: schema.TypeBool, - Computed: true, - }, - - "arn": { + "owner_id": { Type: schema.TypeString, Computed: true, }, - - "tags": tagsSchemaComputed(), }, } } @@ -160,13 +170,14 @@ 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) d.Set("default", vpc.IsDefault) d.Set("state", vpc.State) d.Set("tags", tagsToMap(vpc.Tags)) + d.Set("owner_id", vpc.OwnerId) arn := arn.ARN{ Partition: meta.(*AWSClient).partition, @@ -195,17 +206,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_vpc_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go index 00be63080..f66f1d4ba 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go @@ -46,6 +46,10 @@ func dataSourceAwsVpcDhcpOptions() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, }, "tags": tagsSchemaComputed(), + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -121,6 +125,7 @@ func dataSourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) e if err := d.Set("tags", d.Set("tags", tagsToMap(output.DhcpOptions[0].Tags))); err != nil { return fmt.Errorf("error setting tags: %s", err) } + d.Set("owner_id", output.DhcpOptions[0].OwnerId) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync.go new file mode 100644 index 000000000..9626c4c91 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync.go @@ -0,0 +1,144 @@ +package aws + +import ( + "net/url" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/datasync" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSyncParseLocationURI(uri string) (string, error) { + parsedURL, err := url.ParseRequestURI(uri) + + if err != nil { + return "", err + } + + return parsedURL.Path, nil +} + +func expandDataSyncEc2Config(l []interface{}) *datasync.Ec2Config { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + ec2Config := &datasync.Ec2Config{ + SecurityGroupArns: expandStringSet(m["security_group_arns"].(*schema.Set)), + SubnetArn: aws.String(m["subnet_arn"].(string)), + } + + return ec2Config +} + +func expandDataSyncOnPremConfig(l []interface{}) *datasync.OnPremConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + onPremConfig := &datasync.OnPremConfig{ + AgentArns: expandStringSet(m["agent_arns"].(*schema.Set)), + } + + return onPremConfig +} + +func expandDataSyncOptions(l []interface{}) *datasync.Options { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + options := &datasync.Options{ + Atime: aws.String(m["atime"].(string)), + Gid: aws.String(m["gid"].(string)), + Mtime: aws.String(m["mtime"].(string)), + PreserveDeletedFiles: aws.String(m["preserve_deleted_files"].(string)), + PreserveDevices: aws.String(m["preserve_devices"].(string)), + PosixPermissions: aws.String(m["posix_permissions"].(string)), + Uid: aws.String(m["uid"].(string)), + VerifyMode: aws.String(m["verify_mode"].(string)), + } + + if v, ok := m["bytes_per_second"]; ok && v.(int) > 0 { + options.BytesPerSecond = aws.Int64(int64(v.(int))) + } + + return options +} + +func expandDataSyncS3Config(l []interface{}) *datasync.S3Config { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + s3Config := &datasync.S3Config{ + BucketAccessRoleArn: aws.String(m["bucket_access_role_arn"].(string)), + } + + return s3Config +} + +func flattenDataSyncEc2Config(ec2Config *datasync.Ec2Config) []interface{} { + if ec2Config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "security_group_arns": schema.NewSet(schema.HashString, flattenStringList(ec2Config.SecurityGroupArns)), + "subnet_arn": aws.StringValue(ec2Config.SubnetArn), + } + + return []interface{}{m} +} + +func flattenDataSyncOnPremConfig(onPremConfig *datasync.OnPremConfig) []interface{} { + if onPremConfig == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "agent_arns": schema.NewSet(schema.HashString, flattenStringList(onPremConfig.AgentArns)), + } + + return []interface{}{m} +} + +func flattenDataSyncOptions(options *datasync.Options) []interface{} { + if options == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "atime": aws.StringValue(options.Atime), + "bytes_per_second": aws.Int64Value(options.BytesPerSecond), + "gid": aws.StringValue(options.Gid), + "mtime": aws.StringValue(options.Mtime), + "posix_permissions": aws.StringValue(options.PosixPermissions), + "preserve_deleted_files": aws.StringValue(options.PreserveDeletedFiles), + "preserve_devices": aws.StringValue(options.PreserveDevices), + "uid": aws.StringValue(options.Uid), + "verify_mode": aws.StringValue(options.VerifyMode), + } + + return []interface{}{m} +} + +func flattenDataSyncS3Config(s3Config *datasync.S3Config) []interface{} { + if s3Config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "bucket_access_role_arn": aws.StringValue(s3Config.BucketAccessRoleArn), + } + + return []interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync_tags.go new file mode 100644 index 000000000..037d29d6d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync_tags.go @@ -0,0 +1,63 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/datasync" +) + +// dataSyncTagsDiff 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 dataSyncTagsDiff(oldTags, newTags []*datasync.TagListEntry) ([]*datasync.TagListEntry, []*datasync.TagListEntry) { + // 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 []*datasync.TagListEntry + 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 expandDataSyncTagListEntry(create), remove +} + +func dataSyncTagsKeys(tags []*datasync.TagListEntry) []*string { + keys := make([]*string, 0) + + for _, tag := range tags { + if tag == nil { + continue + } + keys = append(keys, tag.Key) + } + + return keys +} + +func expandDataSyncTagListEntry(m map[string]interface{}) []*datasync.TagListEntry { + result := []*datasync.TagListEntry{} + for k, v := range m { + result = append(result, &datasync.TagListEntry{ + Key: aws.String(k), + Value: aws.String(v.(string)), + }) + } + + return result +} + +func flattenDataSyncTagListEntry(ts []*datasync.TagListEntry) map[string]string { + result := map[string]string{} + for _, t := range ts { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + return result +} 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 ea659c7b6..ebf0a54e0 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/ec2_transit_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_transit_gateway.go new file mode 100644 index 000000000..b3d363d1e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_transit_gateway.go @@ -0,0 +1,592 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" +) + +func decodeEc2TransitGatewayRouteID(id string) (string, string, error) { + parts := strings.Split(id, "_") + + if len(parts) != 2 { + return "", "", fmt.Errorf("Unexpected format of ID (%q), expected tgw-rtb-ID_DESTINATION", id) + } + + return parts[0], parts[1], nil +} + +func decodeEc2TransitGatewayRouteTableAssociationID(id string) (string, string, error) { + parts := strings.Split(id, "_") + + if len(parts) != 2 { + return "", "", fmt.Errorf("Unexpected format of ID (%q), expected tgw-rtb-ID_tgw-attach-ID", id) + } + + return parts[0], parts[1], nil +} + +func decodeEc2TransitGatewayRouteTablePropagationID(id string) (string, string, error) { + parts := strings.Split(id, "_") + + if len(parts) != 2 { + return "", "", fmt.Errorf("Unexpected format of ID (%q), expected tgw-rtb-ID_tgw-attach-ID", id) + } + + return parts[0], parts[1], nil +} + +func ec2DescribeTransitGateway(conn *ec2.EC2, transitGatewayID string) (*ec2.TransitGateway, error) { + input := &ec2.DescribeTransitGatewaysInput{ + TransitGatewayIds: []*string{aws.String(transitGatewayID)}, + } + + log.Printf("[DEBUG] Reading EC2 Transit Gateway (%s): %s", transitGatewayID, input) + for { + output, err := conn.DescribeTransitGateways(input) + + if err != nil { + return nil, err + } + + if output == nil || len(output.TransitGateways) == 0 { + return nil, nil + } + + for _, transitGateway := range output.TransitGateways { + if transitGateway == nil { + continue + } + + if aws.StringValue(transitGateway.TransitGatewayId) == transitGatewayID { + return transitGateway, nil + } + } + + if aws.StringValue(output.NextToken) == "" { + break + } + + input.NextToken = output.NextToken + } + + return nil, nil +} + +func ec2DescribeTransitGatewayRoute(conn *ec2.EC2, transitGatewayRouteTableID, destination string) (*ec2.TransitGatewayRoute, error) { + input := &ec2.SearchTransitGatewayRoutesInput{ + // As of the time of writing, the EC2 API reference documentation (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayRoutes.html) + // incorrectly states which filter Names are allowed. The below are example errors: + // InvalidParameterValue: Value (transit-gateway-route-destination-cidr-block) for parameter Filters is invalid. + // InvalidParameterValue: Value (transit-gateway-route-type) for parameter Filters is invalid. + // InvalidParameterValue: Value (destination-cidr-block) for parameter Filters is invalid. + Filters: []*ec2.Filter{ + { + Name: aws.String("type"), + Values: []*string{aws.String("static")}, + }, + }, + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + log.Printf("[DEBUG] Searching EC2 Transit Gateway Route Table (%s): %s", transitGatewayRouteTableID, input) + output, err := conn.SearchTransitGatewayRoutes(input) + + if err != nil { + return nil, err + } + + if output == nil || len(output.Routes) == 0 { + return nil, nil + } + + for _, route := range output.Routes { + if route == nil { + continue + } + + if aws.StringValue(route.DestinationCidrBlock) == destination { + return route, nil + } + } + + return nil, nil +} + +func ec2DescribeTransitGatewayRouteTable(conn *ec2.EC2, transitGatewayRouteTableID string) (*ec2.TransitGatewayRouteTable, error) { + input := &ec2.DescribeTransitGatewayRouteTablesInput{ + TransitGatewayRouteTableIds: []*string{aws.String(transitGatewayRouteTableID)}, + } + + log.Printf("[DEBUG] Reading EC2 Transit Gateway Route Table (%s): %s", transitGatewayRouteTableID, input) + for { + output, err := conn.DescribeTransitGatewayRouteTables(input) + + if err != nil { + return nil, err + } + + if output == nil || len(output.TransitGatewayRouteTables) == 0 { + return nil, nil + } + + for _, transitGatewayRouteTable := range output.TransitGatewayRouteTables { + if transitGatewayRouteTable == nil { + continue + } + + if aws.StringValue(transitGatewayRouteTable.TransitGatewayRouteTableId) == transitGatewayRouteTableID { + return transitGatewayRouteTable, nil + } + } + + if aws.StringValue(output.NextToken) == "" { + break + } + + input.NextToken = output.NextToken + } + + return nil, nil +} + +func ec2DescribeTransitGatewayRouteTableAssociation(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) (*ec2.TransitGatewayRouteTableAssociation, error) { + if transitGatewayRouteTableID == "" { + return nil, nil + } + + input := &ec2.GetTransitGatewayRouteTableAssociationsInput{ + Filters: []*ec2.Filter{ + { + Name: aws.String("transit-gateway-attachment-id"), + Values: []*string{aws.String(transitGatewayAttachmentID)}, + }, + }, + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + output, err := conn.GetTransitGatewayRouteTableAssociations(input) + + if err != nil { + return nil, err + } + + if output == nil || len(output.Associations) == 0 { + return nil, nil + } + + return output.Associations[0], nil +} + +func ec2DescribeTransitGatewayRouteTablePropagation(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) (*ec2.TransitGatewayRouteTablePropagation, error) { + if transitGatewayRouteTableID == "" { + return nil, nil + } + + input := &ec2.GetTransitGatewayRouteTablePropagationsInput{ + Filters: []*ec2.Filter{ + { + Name: aws.String("transit-gateway-attachment-id"), + Values: []*string{aws.String(transitGatewayAttachmentID)}, + }, + }, + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + output, err := conn.GetTransitGatewayRouteTablePropagations(input) + + if err != nil { + return nil, err + } + + if output == nil || len(output.TransitGatewayRouteTablePropagations) == 0 { + return nil, nil + } + + return output.TransitGatewayRouteTablePropagations[0], nil +} + +func ec2DescribeTransitGatewayVpcAttachment(conn *ec2.EC2, transitGatewayAttachmentID string) (*ec2.TransitGatewayVpcAttachment, error) { + input := &ec2.DescribeTransitGatewayVpcAttachmentsInput{ + TransitGatewayAttachmentIds: []*string{aws.String(transitGatewayAttachmentID)}, + } + + log.Printf("[DEBUG] Reading EC2 Transit Gateway VPC Attachment (%s): %s", transitGatewayAttachmentID, input) + for { + output, err := conn.DescribeTransitGatewayVpcAttachments(input) + + if err != nil { + return nil, err + } + + if output == nil || len(output.TransitGatewayVpcAttachments) == 0 { + return nil, nil + } + + for _, transitGatewayVpcAttachment := range output.TransitGatewayVpcAttachments { + if transitGatewayVpcAttachment == nil { + continue + } + + if aws.StringValue(transitGatewayVpcAttachment.TransitGatewayAttachmentId) == transitGatewayAttachmentID { + return transitGatewayVpcAttachment, nil + } + } + + if aws.StringValue(output.NextToken) == "" { + break + } + + input.NextToken = output.NextToken + } + + return nil, nil +} + +func ec2TransitGatewayRouteTableAssociationUpdate(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string, associate bool) error { + transitGatewayAssociation, err := ec2DescribeTransitGatewayRouteTableAssociation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) + if err != nil { + return fmt.Errorf("error determining EC2 Transit Gateway Attachment Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + if associate && transitGatewayAssociation == nil { + input := &ec2.AssociateTransitGatewayRouteTableInput{ + TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + if _, err := conn.AssociateTransitGatewayRouteTable(input); err != nil { + return fmt.Errorf("error associating EC2 Transit Gateway Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + if err := waitForEc2TransitGatewayRouteTableAssociationCreation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + } else if !associate && transitGatewayAssociation != nil { + input := &ec2.DisassociateTransitGatewayRouteTableInput{ + TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + if _, err := conn.DisassociateTransitGatewayRouteTable(input); err != nil { + return fmt.Errorf("error disassociating EC2 Transit Gateway Route Table (%s) disassociation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + if err := waitForEc2TransitGatewayRouteTableAssociationDeletion(conn, transitGatewayRouteTableID, transitGatewayAttachmentID); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) disassociation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + } + + return nil +} + +func ec2TransitGatewayRouteTablePropagationUpdate(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string, enablePropagation bool) error { + transitGatewayRouteTablePropagation, err := ec2DescribeTransitGatewayRouteTablePropagation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) + if err != nil { + return fmt.Errorf("error determining EC2 Transit Gateway Attachment (%s) propagation to Route Table (%s): %s", transitGatewayAttachmentID, transitGatewayRouteTableID, err) + } + + if enablePropagation && transitGatewayRouteTablePropagation == nil { + input := &ec2.EnableTransitGatewayRouteTablePropagationInput{ + TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + if _, err := conn.EnableTransitGatewayRouteTablePropagation(input); err != nil { + return fmt.Errorf("error enabling EC2 Transit Gateway Attachment (%s) propagation to Route Table (%s): %s", transitGatewayAttachmentID, transitGatewayRouteTableID, err) + } + } else if !enablePropagation && transitGatewayRouteTablePropagation != nil { + input := &ec2.DisableTransitGatewayRouteTablePropagationInput{ + TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + if _, err := conn.DisableTransitGatewayRouteTablePropagation(input); err != nil { + return fmt.Errorf("error disabling EC2 Transit Gateway Attachment (%s) propagation to Route Table (%s): %s", transitGatewayAttachmentID, transitGatewayRouteTableID, err) + } + } + + return nil +} + +func ec2TransitGatewayRefreshFunc(conn *ec2.EC2, transitGatewayID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) + + if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { + return nil, ec2.TransitGatewayStateDeleted, nil + } + + if err != nil { + return nil, "", fmt.Errorf("error reading EC2 Transit Gateway (%s): %s", transitGatewayID, err) + } + + if transitGateway == nil { + return nil, ec2.TransitGatewayStateDeleted, nil + } + + return transitGateway, aws.StringValue(transitGateway.State), nil + } +} + +func ec2TransitGatewayRouteTableRefreshFunc(conn *ec2.EC2, transitGatewayRouteTableID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + transitGatewayRouteTable, err := ec2DescribeTransitGatewayRouteTable(conn, transitGatewayRouteTableID) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + return nil, ec2.TransitGatewayRouteTableStateDeleted, nil + } + + if err != nil { + return nil, "", fmt.Errorf("error reading EC2 Transit Gateway Route Table (%s): %s", transitGatewayRouteTableID, err) + } + + if transitGatewayRouteTable == nil { + return nil, ec2.TransitGatewayRouteTableStateDeleted, nil + } + + return transitGatewayRouteTable, aws.StringValue(transitGatewayRouteTable.State), nil + } +} + +func ec2TransitGatewayRouteTableAssociationRefreshFunc(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + transitGatewayAssociation, err := ec2DescribeTransitGatewayRouteTableAssociation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + return nil, ec2.TransitGatewayRouteTableStateDeleted, nil + } + + if err != nil { + return nil, "", fmt.Errorf("error reading EC2 Transit Gateway Route Table (%s) Association for (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + if transitGatewayAssociation == nil { + return nil, ec2.TransitGatewayRouteTableStateDeleted, nil + } + + return transitGatewayAssociation, aws.StringValue(transitGatewayAssociation.State), nil + } +} + +func ec2TransitGatewayVpcAttachmentRefreshFunc(conn *ec2.EC2, transitGatewayAttachmentID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + transitGatewayVpcAttachment, err := ec2DescribeTransitGatewayVpcAttachment(conn, transitGatewayAttachmentID) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + return nil, ec2.TransitGatewayAttachmentStateDeleted, nil + } + + if err != nil { + return nil, "", fmt.Errorf("error reading EC2 Transit Gateway VPC Attachment (%s): %s", transitGatewayAttachmentID, err) + } + + if transitGatewayVpcAttachment == nil { + return nil, ec2.TransitGatewayAttachmentStateDeleted, nil + } + + return transitGatewayVpcAttachment, aws.StringValue(transitGatewayVpcAttachment.State), nil + } +} + +func expandEc2TransitGatewayTagSpecifications(m map[string]interface{}) []*ec2.TagSpecification { + if len(m) == 0 { + return nil + } + + return []*ec2.TagSpecification{ + { + ResourceType: aws.String("transit-gateway"), + Tags: tagsFromMap(m), + }, + } +} + +func expandEc2TransitGatewayAttachmentTagSpecifications(m map[string]interface{}) []*ec2.TagSpecification { + if len(m) == 0 { + return nil + } + + return []*ec2.TagSpecification{ + { + ResourceType: aws.String("transit-gateway-attachment"), + Tags: tagsFromMap(m), + }, + } +} + +func expandEc2TransitGatewayRouteTableTagSpecifications(m map[string]interface{}) []*ec2.TagSpecification { + if len(m) == 0 { + return nil + } + + return []*ec2.TagSpecification{ + { + ResourceType: aws.String("transit-gateway-route-table"), + Tags: tagsFromMap(m), + }, + } +} + +func waitForEc2TransitGatewayCreation(conn *ec2.EC2, transitGatewayID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.TransitGatewayStatePending}, + Target: []string{ec2.TransitGatewayStateAvailable}, + Refresh: ec2TransitGatewayRefreshFunc(conn, transitGatewayID), + Timeout: 10 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway (%s) availability", transitGatewayID) + _, err := stateConf.WaitForState() + + return err +} + +func waitForEc2TransitGatewayDeletion(conn *ec2.EC2, transitGatewayID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + ec2.TransitGatewayStateAvailable, + ec2.TransitGatewayStateDeleting, + }, + Target: []string{ec2.TransitGatewayStateDeleted}, + Refresh: ec2TransitGatewayRefreshFunc(conn, transitGatewayID), + Timeout: 10 * time.Minute, + NotFoundChecks: 1, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway (%s) deletion", transitGatewayID) + _, err := stateConf.WaitForState() + + if isResourceNotFoundError(err) { + return nil + } + + return err +} + +func waitForEc2TransitGatewayRouteTableCreation(conn *ec2.EC2, transitGatewayRouteTableID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.TransitGatewayRouteTableStatePending}, + Target: []string{ec2.TransitGatewayRouteTableStateAvailable}, + Refresh: ec2TransitGatewayRouteTableRefreshFunc(conn, transitGatewayRouteTableID), + Timeout: 10 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway Route Table (%s) availability", transitGatewayRouteTableID) + _, err := stateConf.WaitForState() + + return err +} + +func waitForEc2TransitGatewayRouteTableDeletion(conn *ec2.EC2, transitGatewayRouteTableID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + ec2.TransitGatewayRouteTableStateAvailable, + ec2.TransitGatewayRouteTableStateDeleting, + }, + Target: []string{ec2.TransitGatewayRouteTableStateDeleted}, + Refresh: ec2TransitGatewayRouteTableRefreshFunc(conn, transitGatewayRouteTableID), + Timeout: 10 * time.Minute, + NotFoundChecks: 1, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway Route Table (%s) deletion", transitGatewayRouteTableID) + _, err := stateConf.WaitForState() + + if isResourceNotFoundError(err) { + return nil + } + + return err +} + +func waitForEc2TransitGatewayRouteTableAssociationCreation(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.TransitGatewayAssociationStateAssociating}, + Target: []string{ec2.TransitGatewayAssociationStateAssociated}, + Refresh: ec2TransitGatewayRouteTableAssociationRefreshFunc(conn, transitGatewayRouteTableID, transitGatewayAttachmentID), + Timeout: 5 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway Route Table (%s) association: %s", transitGatewayRouteTableID, transitGatewayAttachmentID) + _, err := stateConf.WaitForState() + + return err +} + +func waitForEc2TransitGatewayRouteTableAssociationDeletion(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + ec2.TransitGatewayAssociationStateAssociated, + ec2.TransitGatewayAssociationStateDisassociating, + }, + Target: []string{""}, + Refresh: ec2TransitGatewayRouteTableAssociationRefreshFunc(conn, transitGatewayRouteTableID, transitGatewayAttachmentID), + Timeout: 5 * time.Minute, + NotFoundChecks: 1, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway Route Table (%s) disassociation: %s", transitGatewayRouteTableID, transitGatewayAttachmentID) + _, err := stateConf.WaitForState() + + if isResourceNotFoundError(err) { + return nil + } + + return err +} + +func waitForEc2TransitGatewayRouteTableAttachmentCreation(conn *ec2.EC2, transitGatewayAttachmentID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.TransitGatewayAttachmentStatePending}, + Target: []string{ec2.TransitGatewayAttachmentStateAvailable}, + Refresh: ec2TransitGatewayVpcAttachmentRefreshFunc(conn, transitGatewayAttachmentID), + Timeout: 10 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway VPC Attachment (%s) availability", transitGatewayAttachmentID) + _, err := stateConf.WaitForState() + + return err +} + +func waitForEc2TransitGatewayRouteTableAttachmentDeletion(conn *ec2.EC2, transitGatewayAttachmentID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + ec2.TransitGatewayAttachmentStateAvailable, + ec2.TransitGatewayAttachmentStateDeleting, + }, + Target: []string{ec2.TransitGatewayAttachmentStateDeleted}, + Refresh: ec2TransitGatewayVpcAttachmentRefreshFunc(conn, transitGatewayAttachmentID), + Timeout: 10 * time.Minute, + NotFoundChecks: 1, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway VPC Attachment (%s) deletion", transitGatewayAttachmentID) + _, err := stateConf.WaitForState() + + if isResourceNotFoundError(err) { + return nil + } + + return err +} + +func waitForEc2TransitGatewayRouteTableAttachmentUpdate(conn *ec2.EC2, transitGatewayAttachmentID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.TransitGatewayAttachmentStateModifying}, + Target: []string{ec2.TransitGatewayAttachmentStateAvailable}, + Refresh: ec2TransitGatewayVpcAttachmentRefreshFunc(conn, transitGatewayAttachmentID), + Timeout: 10 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for EC2 Transit Gateway VPC Attachment (%s) availability", transitGatewayAttachmentID) + _, err := stateConf.WaitForState() + + return err +} 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 8dd5394a2..72791b76d 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,7 +13,9 @@ import ( "github.com/mitchellh/copystructure" ) -func ecsContainerDefinitionsAreEquivalent(def1, def2 string, isAWSVPC bool) (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 { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/hosted_zones.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/hosted_zones.go index a401c02c6..9274c1af3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/hosted_zones.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/hosted_zones.go @@ -6,22 +6,25 @@ import "fmt" // http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints // It currently cannot be generated from the API json. var hostedZoneIDsMap = map[string]string{ - "us-east-1": "Z3AQBSTGFYJSTF", - "us-east-2": "Z2O1EMRO9K5GLX", - "us-west-2": "Z3BJ6K6RIION7M", - "us-west-1": "Z2F56UZL2M1ACD", - "eu-west-1": "Z1BKCTXD74EZPE", - "eu-west-2": "Z3GKZC51ZF0DB4", - "eu-west-3": "Z3R1K369G5AVDG", - "eu-central-1": "Z21DNDUVLTQW6Q", + "ap-northeast-1": "Z2M4EHUR26P7ZW", + "ap-northeast-2": "Z3W03O7B5YMIYP", + "ap-northeast-3": "Z2YQB5RD63NC85", "ap-south-1": "Z11RGJOFQNVJUP", "ap-southeast-1": "Z3O0J2DXBE1FTB", "ap-southeast-2": "Z1WCIGYICN2BYD", - "ap-northeast-1": "Z2M4EHUR26P7ZW", - "ap-northeast-2": "Z3W03O7B5YMIYP", "ca-central-1": "Z1QDHH18159H29", + "eu-central-1": "Z21DNDUVLTQW6Q", + "eu-north-1": "Z3BAZG2TWCNX0D", + "eu-west-1": "Z1BKCTXD74EZPE", + "eu-west-2": "Z3GKZC51ZF0DB4", + "eu-west-3": "Z3R1K369G5AVDG", "sa-east-1": "Z7KQH4QJS55SO", + "us-east-1": "Z3AQBSTGFYJSTF", + "us-east-2": "Z2O1EMRO9K5GLX", + "us-gov-east-1": "Z31GFT0UA1I2HV", "us-gov-west-1": "Z31GFT0UA1I2HV", + "us-west-1": "Z2F56UZL2M1ACD", + "us-west-2": "Z3BJ6K6RIION7M", } // Returns the hosted zone ID for an S3 website endpoint region. This can be 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 ee76ca3e0..c08b68e78 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 { 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 d6e8ac73f..7d107c649 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 @@ -160,114 +160,121 @@ func Provider() terraform.ResourceProvider { }, DataSourcesMap: map[string]*schema.Resource{ - "aws_acm_certificate": dataSourceAwsAcmCertificate(), - "aws_acmpca_certificate_authority": dataSourceAwsAcmpcaCertificateAuthority(), - "aws_ami": dataSourceAwsAmi(), - "aws_ami_ids": dataSourceAwsAmiIds(), - "aws_api_gateway_resource": dataSourceAwsApiGatewayResource(), - "aws_api_gateway_rest_api": dataSourceAwsApiGatewayRestApi(), - "aws_arn": dataSourceAwsArn(), - "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), - "aws_availability_zone": dataSourceAwsAvailabilityZone(), - "aws_availability_zones": dataSourceAwsAvailabilityZones(), - "aws_batch_compute_environment": dataSourceAwsBatchComputeEnvironment(), - "aws_batch_job_queue": dataSourceAwsBatchJobQueue(), - "aws_billing_service_account": dataSourceAwsBillingServiceAccount(), - "aws_caller_identity": dataSourceAwsCallerIdentity(), - "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(), - "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), - "aws_ebs_snapshot": dataSourceAwsEbsSnapshot(), - "aws_ebs_snapshot_ids": dataSourceAwsEbsSnapshotIds(), - "aws_ebs_volume": dataSourceAwsEbsVolume(), - "aws_ecr_repository": dataSourceAwsEcrRepository(), - "aws_ecs_cluster": dataSourceAwsEcsCluster(), - "aws_ecs_container_definition": dataSourceAwsEcsContainerDefinition(), - "aws_ecs_service": dataSourceAwsEcsService(), - "aws_ecs_task_definition": dataSourceAwsEcsTaskDefinition(), - "aws_efs_file_system": dataSourceAwsEfsFileSystem(), - "aws_efs_mount_target": dataSourceAwsEfsMountTarget(), - "aws_eip": dataSourceAwsEip(), - "aws_eks_cluster": dataSourceAwsEksCluster(), - "aws_elastic_beanstalk_hosted_zone": dataSourceAwsElasticBeanstalkHostedZone(), - "aws_elastic_beanstalk_solution_stack": dataSourceAwsElasticBeanstalkSolutionStack(), - "aws_elasticache_cluster": dataSourceAwsElastiCacheCluster(), - "aws_elb": dataSourceAwsElb(), - "aws_elasticache_replication_group": dataSourceAwsElasticacheReplicationGroup(), - "aws_elb_hosted_zone_id": dataSourceAwsElbHostedZoneId(), - "aws_elb_service_account": dataSourceAwsElbServiceAccount(), - "aws_glue_script": dataSourceAwsGlueScript(), - "aws_iam_account_alias": dataSourceAwsIamAccountAlias(), - "aws_iam_group": dataSourceAwsIAMGroup(), - "aws_iam_instance_profile": dataSourceAwsIAMInstanceProfile(), - "aws_iam_policy": dataSourceAwsIAMPolicy(), - "aws_iam_policy_document": dataSourceAwsIamPolicyDocument(), - "aws_iam_role": dataSourceAwsIAMRole(), - "aws_iam_server_certificate": dataSourceAwsIAMServerCertificate(), - "aws_iam_user": dataSourceAwsIAMUser(), - "aws_internet_gateway": dataSourceAwsInternetGateway(), - "aws_iot_endpoint": dataSourceAwsIotEndpoint(), - "aws_inspector_rules_packages": dataSourceAwsInspectorRulesPackages(), - "aws_instance": dataSourceAwsInstance(), - "aws_instances": dataSourceAwsInstances(), - "aws_ip_ranges": dataSourceAwsIPRanges(), - "aws_kinesis_stream": dataSourceAwsKinesisStream(), - "aws_kms_alias": dataSourceAwsKmsAlias(), - "aws_kms_ciphertext": dataSourceAwsKmsCiphertext(), - "aws_kms_key": dataSourceAwsKmsKey(), - "aws_kms_secret": dataSourceAwsKmsSecret(), - "aws_kms_secrets": dataSourceAwsKmsSecrets(), - "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(), - "aws_network_interface": dataSourceAwsNetworkInterface(), - "aws_network_interfaces": dataSourceAwsNetworkInterfaces(), - "aws_partition": dataSourceAwsPartition(), - "aws_prefix_list": dataSourceAwsPrefixList(), - "aws_pricing_product": dataSourceAwsPricingProduct(), - "aws_rds_cluster": dataSourceAwsRdsCluster(), - "aws_redshift_cluster": dataSourceAwsRedshiftCluster(), - "aws_redshift_service_account": dataSourceAwsRedshiftServiceAccount(), - "aws_region": dataSourceAwsRegion(), - "aws_route": dataSourceAwsRoute(), - "aws_route_table": dataSourceAwsRouteTable(), - "aws_route_tables": dataSourceAwsRouteTables(), - "aws_route53_zone": dataSourceAwsRoute53Zone(), - "aws_s3_bucket": dataSourceAwsS3Bucket(), - "aws_s3_bucket_object": dataSourceAwsS3BucketObject(), - "aws_secretsmanager_secret": dataSourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": dataSourceAwsSecretsManagerSecretVersion(), - "aws_sns_topic": dataSourceAwsSnsTopic(), - "aws_sqs_queue": dataSourceAwsSqsQueue(), - "aws_ssm_parameter": dataSourceAwsSsmParameter(), - "aws_storagegateway_local_disk": dataSourceAwsStorageGatewayLocalDisk(), - "aws_subnet": dataSourceAwsSubnet(), - "aws_subnet_ids": dataSourceAwsSubnetIDs(), - "aws_vpcs": dataSourceAwsVpcs(), - "aws_security_group": dataSourceAwsSecurityGroup(), - "aws_security_groups": dataSourceAwsSecurityGroups(), - "aws_vpc": dataSourceAwsVpc(), - "aws_vpc_dhcp_options": dataSourceAwsVpcDhcpOptions(), - "aws_vpc_endpoint": dataSourceAwsVpcEndpoint(), - "aws_vpc_endpoint_service": dataSourceAwsVpcEndpointService(), - "aws_vpc_peering_connection": dataSourceAwsVpcPeeringConnection(), - "aws_vpn_gateway": dataSourceAwsVpnGateway(), - "aws_workspaces_bundle": dataSourceAwsWorkspaceBundle(), + "aws_acm_certificate": dataSourceAwsAcmCertificate(), + "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_api_gateway_vpc_link": dataSourceAwsApiGatewayVpcLink(), + "aws_arn": dataSourceAwsArn(), + "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), + "aws_availability_zone": dataSourceAwsAvailabilityZone(), + "aws_availability_zones": dataSourceAwsAvailabilityZones(), + "aws_batch_compute_environment": dataSourceAwsBatchComputeEnvironment(), + "aws_batch_job_queue": dataSourceAwsBatchJobQueue(), + "aws_billing_service_account": dataSourceAwsBillingServiceAccount(), + "aws_caller_identity": dataSourceAwsCallerIdentity(), + "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(), + "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), + "aws_ebs_snapshot": dataSourceAwsEbsSnapshot(), + "aws_ebs_snapshot_ids": dataSourceAwsEbsSnapshotIds(), + "aws_ebs_volume": dataSourceAwsEbsVolume(), + "aws_ec2_transit_gateway": dataSourceAwsEc2TransitGateway(), + "aws_ec2_transit_gateway_route_table": dataSourceAwsEc2TransitGatewayRouteTable(), + "aws_ec2_transit_gateway_vpc_attachment": dataSourceAwsEc2TransitGatewayVpcAttachment(), + "aws_ecr_repository": dataSourceAwsEcrRepository(), + "aws_ecs_cluster": dataSourceAwsEcsCluster(), + "aws_ecs_container_definition": dataSourceAwsEcsContainerDefinition(), + "aws_ecs_service": dataSourceAwsEcsService(), + "aws_ecs_task_definition": dataSourceAwsEcsTaskDefinition(), + "aws_efs_file_system": dataSourceAwsEfsFileSystem(), + "aws_efs_mount_target": dataSourceAwsEfsMountTarget(), + "aws_eip": dataSourceAwsEip(), + "aws_eks_cluster": dataSourceAwsEksCluster(), + "aws_elastic_beanstalk_hosted_zone": dataSourceAwsElasticBeanstalkHostedZone(), + "aws_elastic_beanstalk_solution_stack": dataSourceAwsElasticBeanstalkSolutionStack(), + "aws_elasticache_cluster": dataSourceAwsElastiCacheCluster(), + "aws_elb": dataSourceAwsElb(), + "aws_elasticache_replication_group": dataSourceAwsElasticacheReplicationGroup(), + "aws_elb_hosted_zone_id": dataSourceAwsElbHostedZoneId(), + "aws_elb_service_account": dataSourceAwsElbServiceAccount(), + "aws_glue_script": dataSourceAwsGlueScript(), + "aws_iam_account_alias": dataSourceAwsIamAccountAlias(), + "aws_iam_group": dataSourceAwsIAMGroup(), + "aws_iam_instance_profile": dataSourceAwsIAMInstanceProfile(), + "aws_iam_policy": dataSourceAwsIAMPolicy(), + "aws_iam_policy_document": dataSourceAwsIamPolicyDocument(), + "aws_iam_role": dataSourceAwsIAMRole(), + "aws_iam_server_certificate": dataSourceAwsIAMServerCertificate(), + "aws_iam_user": dataSourceAwsIAMUser(), + "aws_internet_gateway": dataSourceAwsInternetGateway(), + "aws_iot_endpoint": dataSourceAwsIotEndpoint(), + "aws_inspector_rules_packages": dataSourceAwsInspectorRulesPackages(), + "aws_instance": dataSourceAwsInstance(), + "aws_instances": dataSourceAwsInstances(), + "aws_ip_ranges": dataSourceAwsIPRanges(), + "aws_kinesis_stream": dataSourceAwsKinesisStream(), + "aws_kms_alias": dataSourceAwsKmsAlias(), + "aws_kms_ciphertext": dataSourceAwsKmsCiphertext(), + "aws_kms_key": dataSourceAwsKmsKey(), + "aws_kms_secret": dataSourceAwsKmsSecret(), + "aws_kms_secrets": dataSourceAwsKmsSecrets(), + "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(), + "aws_network_interface": dataSourceAwsNetworkInterface(), + "aws_network_interfaces": dataSourceAwsNetworkInterfaces(), + "aws_partition": dataSourceAwsPartition(), + "aws_prefix_list": dataSourceAwsPrefixList(), + "aws_pricing_product": dataSourceAwsPricingProduct(), + "aws_rds_cluster": dataSourceAwsRdsCluster(), + "aws_redshift_cluster": dataSourceAwsRedshiftCluster(), + "aws_redshift_service_account": dataSourceAwsRedshiftServiceAccount(), + "aws_region": dataSourceAwsRegion(), + "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(), + "aws_secretsmanager_secret": dataSourceAwsSecretsManagerSecret(), + "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(), + "aws_subnet_ids": dataSourceAwsSubnetIDs(), + "aws_vpcs": dataSourceAwsVpcs(), + "aws_security_group": dataSourceAwsSecurityGroup(), + "aws_security_groups": dataSourceAwsSecurityGroups(), + "aws_vpc": dataSourceAwsVpc(), + "aws_vpc_dhcp_options": dataSourceAwsVpcDhcpOptions(), + "aws_vpc_endpoint": dataSourceAwsVpcEndpoint(), + "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(), @@ -313,6 +320,10 @@ func Provider() terraform.ResourceProvider { "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), + "aws_appmesh_mesh": resourceAwsAppmeshMesh(), + "aws_appmesh_route": resourceAwsAppmeshRoute(), + "aws_appmesh_virtual_node": resourceAwsAppmeshVirtualNode(), + "aws_appmesh_virtual_router": resourceAwsAppmeshVirtualRouter(), "aws_appsync_api_key": resourceAwsAppsyncApiKey(), "aws_appsync_datasource": resourceAwsAppsyncDatasource(), "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), @@ -369,6 +380,11 @@ func Provider() terraform.ResourceProvider { "aws_codepipeline": resourceAwsCodePipeline(), "aws_codepipeline_webhook": resourceAwsCodePipelineWebhook(), "aws_customer_gateway": resourceAwsCustomerGateway(), + "aws_datasync_agent": resourceAwsDataSyncAgent(), + "aws_datasync_location_efs": resourceAwsDataSyncLocationEfs(), + "aws_datasync_location_nfs": resourceAwsDataSyncLocationNfs(), + "aws_datasync_location_s3": resourceAwsDataSyncLocationS3(), + "aws_datasync_task": resourceAwsDataSyncTask(), "aws_dax_cluster": resourceAwsDaxCluster(), "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), @@ -383,6 +399,7 @@ 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(), @@ -403,10 +420,17 @@ func Provider() terraform.ResourceProvider { "aws_dynamodb_table": resourceAwsDynamoDbTable(), "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ec2_fleet": resourceAwsEc2Fleet(), "aws_ebs_snapshot": resourceAwsEbsSnapshot(), "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ec2_capacity_reservation": resourceAwsEc2CapacityReservation(), + "aws_ec2_fleet": resourceAwsEc2Fleet(), + "aws_ec2_transit_gateway": resourceAwsEc2TransitGateway(), + "aws_ec2_transit_gateway_route": resourceAwsEc2TransitGatewayRoute(), + "aws_ec2_transit_gateway_route_table": resourceAwsEc2TransitGatewayRouteTable(), + "aws_ec2_transit_gateway_route_table_association": resourceAwsEc2TransitGatewayRouteTableAssociation(), + "aws_ec2_transit_gateway_route_table_propagation": resourceAwsEc2TransitGatewayRouteTablePropagation(), + "aws_ec2_transit_gateway_vpc_attachment": resourceAwsEc2TransitGatewayVpcAttachment(), "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), "aws_ecr_repository": resourceAwsEcrRepository(), "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), @@ -441,13 +465,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(), @@ -483,12 +510,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(), @@ -551,6 +581,7 @@ func Provider() terraform.ResourceProvider { "aws_placement_group": resourceAwsPlacementGroup(), "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), "aws_rds_cluster": resourceAwsRDSCluster(), + "aws_rds_cluster_endpoint": resourceAwsRDSClusterEndpoint(), "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), "aws_redshift_cluster": resourceAwsRedshiftCluster(), @@ -593,6 +624,7 @@ func Provider() terraform.ResourceProvider { "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), "aws_default_security_group": resourceAwsDefaultSecurityGroup(), "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_securityhub_account": resourceAwsSecurityHubAccount(), "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), @@ -631,6 +663,7 @@ func Provider() terraform.ResourceProvider { "aws_default_subnet": resourceAwsDefaultSubnet(), "aws_subnet": resourceAwsSubnet(), "aws_swf_domain": resourceAwsSwfDomain(), + "aws_transfer_server": resourceAwsTransferServer(), "aws_volume_attachment": resourceAwsVolumeAttachment(), "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), @@ -683,6 +716,9 @@ func Provider() terraform.ResourceProvider { "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(), @@ -754,6 +790,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", @@ -879,6 +917,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) @@ -1053,6 +1092,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 db49e7d09..7a3e0b3e2 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 @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -26,12 +27,24 @@ func resourceAwsAcmCertificate() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + StateFunc: func(v interface{}) string { + // AWS Provider 1.42.0+ aws_route53_zone references may contain a + // trailing period, which generates an ACM API error + return strings.TrimSuffix(v.(string), ".") + }, }, "subject_alternative_names": { Type: schema.TypeList, Optional: true, ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Elem: &schema.Schema{ + Type: schema.TypeString, + StateFunc: func(v interface{}) string { + // AWS Provider 1.42.0+ aws_route53_zone references may contain a + // trailing period, which generates an ACM API error + return strings.TrimSuffix(v.(string), ".") + }, + }, }, "validation_method": { Type: schema.TypeString, @@ -79,14 +92,16 @@ func resourceAwsAcmCertificate() *schema.Resource { func resourceAwsAcmCertificateCreate(d *schema.ResourceData, meta interface{}) error { acmconn := meta.(*AWSClient).acmconn params := &acm.RequestCertificateInput{ - DomainName: aws.String(d.Get("domain_name").(string)), + DomainName: aws.String(strings.TrimSuffix(d.Get("domain_name").(string), ".")), ValidationMethod: aws.String(d.Get("validation_method").(string)), } - sans, ok := d.GetOk("subject_alternative_names") - if ok { - sanStrings := sans.([]interface{}) - params.SubjectAlternativeNames = expandStringList(sanStrings) + if sans, ok := d.GetOk("subject_alternative_names"); ok { + subjectAlternativeNames := make([]*string, len(sans.([]interface{}))) + for i, sanRaw := range sans.([]interface{}) { + subjectAlternativeNames[i] = aws.String(strings.TrimSuffix(sanRaw.(string), ".")) + } + params.SubjectAlternativeNames = subjectAlternativeNames } log.Printf("[DEBUG] ACM Certificate Request: %#v", params) 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 e8158743c..75bbc1460 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_launch_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go index cbc6d1447..9d075c3a4 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 b11f38706..252c0db97 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 @@ -173,20 +173,27 @@ func resourceAwsApiGatewayDeploymentDelete(d *schema.ResourceData, meta interfac log.Printf("[DEBUG] Deleting API Gateway Deployment: %s", d.Id()) // If the stage has been updated to point at a different deployment, then - // the stage should not be removed then this deployment is deleted. + // the stage should not be removed when 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)), - }) + // API Gateway allows an empty state name (e.g. ""), but the AWS Go SDK + // now has validation for the parameter, so we must check first. + // InvalidParameter: 1 validation error(s) found. + // - minimum field size of 1, GetStageInput.StageName. + stageName := d.Get("stage_name").(string) + if stageName != "" { + stage, err := conn.GetStage(&apigateway.GetStageInput{ + StageName: aws.String(stageName), + 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 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 stage != nil && aws.StringValue(stage.DeploymentId) == d.Id() { + shouldDeleteStage = true + } } if shouldDeleteStage { @@ -198,7 +205,7 @@ func resourceAwsApiGatewayDeploymentDelete(d *schema.ResourceData, meta interfac } } - _, err = conn.DeleteDeployment(&apigateway.DeleteDeploymentInput{ + _, err := conn.DeleteDeployment(&apigateway.DeleteDeploymentInput{ DeploymentId: aws.String(d.Id()), RestApiId: aws.String(d.Get("rest_api_id").(string)), }) 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 627f57b28..a2c8e1347 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 @@ -339,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{}) @@ -411,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_appmesh_mesh.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_mesh.go new file mode 100644 index 000000000..f68c81f45 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_mesh.go @@ -0,0 +1,111 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAppmeshMesh() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAppmeshMeshCreate, + Read: resourceAwsAppmeshMeshRead, + Delete: resourceAwsAppmeshMeshDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "created_date": { + Type: schema.TypeString, + Computed: true, + }, + + "last_updated_date": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsAppmeshMeshCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + meshName := d.Get("name").(string) + req := &appmesh.CreateMeshInput{ + MeshName: aws.String(meshName), + } + + log.Printf("[DEBUG] Creating App Mesh service mesh: %#v", req) + _, err := conn.CreateMesh(req) + if err != nil { + return fmt.Errorf("error creating App Mesh service mesh: %s", err) + } + + d.SetId(meshName) + + return resourceAwsAppmeshMeshRead(d, meta) +} + +func resourceAwsAppmeshMeshRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + resp, err := conn.DescribeMesh(&appmesh.DescribeMeshInput{ + MeshName: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, "NotFoundException", "") { + log.Printf("[WARN] App Mesh service mesh (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading App Mesh service mesh: %s", err) + } + if aws.StringValue(resp.Mesh.Status.Status) == appmesh.MeshStatusCodeDeleted { + log.Printf("[WARN] App Mesh service mesh (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", resp.Mesh.MeshName) + d.Set("arn", resp.Mesh.Metadata.Arn) + d.Set("created_date", resp.Mesh.Metadata.CreatedAt.Format(time.RFC3339)) + d.Set("last_updated_date", resp.Mesh.Metadata.LastUpdatedAt.Format(time.RFC3339)) + + return nil +} + +func resourceAwsAppmeshMeshDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + log.Printf("[DEBUG] Deleting App Mesh service mesh: %s", d.Id()) + _, err := conn.DeleteMesh(&appmesh.DeleteMeshInput{ + MeshName: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, "NotFoundException", "") { + return nil + } + return fmt.Errorf("error deleting App Mesh service mesh: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go new file mode 100644 index 000000000..b0972edb6 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go @@ -0,0 +1,238 @@ +package aws + +import ( + "bytes" + "fmt" + "log" + "regexp" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAppmeshRoute() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAppmeshRouteCreate, + Read: resourceAwsAppmeshRouteRead, + Update: resourceAwsAppmeshRouteUpdate, + Delete: resourceAwsAppmeshRouteDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + + "mesh_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + + "virtual_router_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + + "spec": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "http_route": { + Type: schema.TypeList, + Optional: true, + MinItems: 0, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "weighted_target": { + Type: schema.TypeSet, + Required: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "virtual_node": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + "weight": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(0, 100), + }, + }, + }, + Set: appmeshRouteWeightedTargetHash, + }, + }, + }, + }, + + "match": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "prefix": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^/`), "must start with /"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "created_date": { + Type: schema.TypeString, + Computed: true, + }, + + "last_updated_date": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsAppmeshRouteCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + req := &appmesh.CreateRouteInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + RouteName: aws.String(d.Get("name").(string)), + VirtualRouterName: aws.String(d.Get("virtual_router_name").(string)), + Spec: expandAppmeshRouteSpec(d.Get("spec").([]interface{})), + } + + log.Printf("[DEBUG] Creating App Mesh route: %#v", req) + resp, err := conn.CreateRoute(req) + if err != nil { + return fmt.Errorf("error creating App Mesh route: %s", err) + } + + d.SetId(aws.StringValue(resp.Route.Metadata.Uid)) + + return resourceAwsAppmeshRouteRead(d, meta) +} + +func resourceAwsAppmeshRouteRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + resp, err := conn.DescribeRoute(&appmesh.DescribeRouteInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + RouteName: aws.String(d.Get("name").(string)), + VirtualRouterName: aws.String(d.Get("virtual_router_name").(string)), + }) + if err != nil { + if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { + log.Printf("[WARN] App Mesh route (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading App Mesh route: %s", err) + } + if aws.StringValue(resp.Route.Status.Status) == appmesh.RouteStatusCodeDeleted { + log.Printf("[WARN] App Mesh route (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", resp.Route.RouteName) + d.Set("mesh_name", resp.Route.MeshName) + d.Set("virtual_router_name", resp.Route.VirtualRouterName) + d.Set("arn", resp.Route.Metadata.Arn) + d.Set("created_date", resp.Route.Metadata.CreatedAt.Format(time.RFC3339)) + d.Set("last_updated_date", resp.Route.Metadata.LastUpdatedAt.Format(time.RFC3339)) + if err := d.Set("spec", flattenAppmeshRouteSpec(resp.Route.Spec)); err != nil { + return err + } + + return nil +} + +func resourceAwsAppmeshRouteUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + if d.HasChange("spec") { + _, v := d.GetChange("spec") + req := &appmesh.UpdateRouteInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + RouteName: aws.String(d.Get("name").(string)), + VirtualRouterName: aws.String(d.Get("virtual_router_name").(string)), + Spec: expandAppmeshRouteSpec(v.([]interface{})), + } + + log.Printf("[DEBUG] Updating App Mesh route: %#v", req) + _, err := conn.UpdateRoute(req) + if err != nil { + return fmt.Errorf("error updating App Mesh route: %s", err) + } + } + + return resourceAwsAppmeshRouteRead(d, meta) +} + +func resourceAwsAppmeshRouteDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + log.Printf("[DEBUG] Deleting App Mesh route: %s", d.Id()) + _, err := conn.DeleteRoute(&appmesh.DeleteRouteInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + RouteName: aws.String(d.Get("name").(string)), + VirtualRouterName: aws.String(d.Get("virtual_router_name").(string)), + }) + if err != nil { + if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting App Mesh route: %s", err) + } + + return nil +} + +func appmeshRouteWeightedTargetHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + if v, ok := m["virtual_node"].(string); ok { + buf.WriteString(fmt.Sprintf("%s-", v)) + } + if v, ok := m["weight"].(int); ok { + buf.WriteString(fmt.Sprintf("%d-", v)) + } + return hashcode.String(buf.String()) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go new file mode 100644 index 000000000..072cdac7c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go @@ -0,0 +1,240 @@ +package aws + +import ( + "bytes" + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAppmeshVirtualNode() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAppmeshVirtualNodeCreate, + Read: resourceAwsAppmeshVirtualNodeRead, + Update: resourceAwsAppmeshVirtualNodeUpdate, + Delete: resourceAwsAppmeshVirtualNodeDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + + "mesh_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + + "spec": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "backends": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "listener": { + Type: schema.TypeSet, + Optional: true, + MinItems: 0, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "port_mapping": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "port": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 65535), + }, + + "protocol": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + appmesh.PortProtocolHttp, + appmesh.PortProtocolTcp, + }, false), + }, + }, + }, + }, + }, + }, + Set: appmeshVirtualNodeListenerHash, + }, + + "service_discovery": { + Type: schema.TypeList, + Optional: true, + MinItems: 0, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "dns": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "created_date": { + Type: schema.TypeString, + Computed: true, + }, + + "last_updated_date": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsAppmeshVirtualNodeCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + req := &appmesh.CreateVirtualNodeInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + VirtualNodeName: aws.String(d.Get("name").(string)), + Spec: expandAppmeshVirtualNodeSpec(d.Get("spec").([]interface{})), + } + + log.Printf("[DEBUG] Creating App Mesh virtual node: %#v", req) + resp, err := conn.CreateVirtualNode(req) + if err != nil { + return fmt.Errorf("error creating App Mesh virtual node: %s", err) + } + + d.SetId(aws.StringValue(resp.VirtualNode.Metadata.Uid)) + + return resourceAwsAppmeshVirtualNodeRead(d, meta) +} + +func resourceAwsAppmeshVirtualNodeRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + resp, err := conn.DescribeVirtualNode(&appmesh.DescribeVirtualNodeInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + VirtualNodeName: aws.String(d.Get("name").(string)), + }) + if err != nil { + if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { + log.Printf("[WARN] App Mesh virtual node (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading App Mesh virtual node: %s", err) + } + if aws.StringValue(resp.VirtualNode.Status.Status) == appmesh.VirtualNodeStatusCodeDeleted { + log.Printf("[WARN] App Mesh virtual node (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", resp.VirtualNode.VirtualNodeName) + d.Set("mesh_name", resp.VirtualNode.MeshName) + d.Set("arn", resp.VirtualNode.Metadata.Arn) + d.Set("created_date", resp.VirtualNode.Metadata.CreatedAt.Format(time.RFC3339)) + d.Set("last_updated_date", resp.VirtualNode.Metadata.LastUpdatedAt.Format(time.RFC3339)) + if err := d.Set("spec", flattenAppmeshVirtualNodeSpec(resp.VirtualNode.Spec)); err != nil { + return err + } + + return nil +} + +func resourceAwsAppmeshVirtualNodeUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + if d.HasChange("spec") { + _, v := d.GetChange("spec") + req := &appmesh.UpdateVirtualNodeInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + VirtualNodeName: aws.String(d.Get("name").(string)), + Spec: expandAppmeshVirtualNodeSpec(v.([]interface{})), + } + + log.Printf("[DEBUG] Updating App Mesh virtual node: %#v", req) + _, err := conn.UpdateVirtualNode(req) + if err != nil { + return fmt.Errorf("error updating App Mesh virtual node: %s", err) + } + } + + return resourceAwsAppmeshVirtualNodeRead(d, meta) +} + +func resourceAwsAppmeshVirtualNodeDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + log.Printf("[DEBUG] Deleting App Mesh virtual node: %s", d.Id()) + _, err := conn.DeleteVirtualNode(&appmesh.DeleteVirtualNodeInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + VirtualNodeName: aws.String(d.Get("name").(string)), + }) + if err != nil { + if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting App Mesh virtual node: %s", err) + } + + return nil +} + +func appmeshVirtualNodeListenerHash(vListener interface{}) int { + var buf bytes.Buffer + mListener := vListener.(map[string]interface{}) + if vPortMapping, ok := mListener["port_mapping"].([]interface{}); ok && len(vPortMapping) > 0 && vPortMapping[0] != nil { + mPortMapping := vPortMapping[0].(map[string]interface{}) + if v, ok := mPortMapping["port"].(int); ok { + buf.WriteString(fmt.Sprintf("%d-", v)) + } + if v, ok := mPortMapping["protocol"].(string); ok { + buf.WriteString(fmt.Sprintf("%s-", v)) + } + } + return hashcode.String(buf.String()) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go new file mode 100644 index 000000000..dde7f39b7 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go @@ -0,0 +1,163 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAppmeshVirtualRouter() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAppmeshVirtualRouterCreate, + Read: resourceAwsAppmeshVirtualRouterRead, + Update: resourceAwsAppmeshVirtualRouterUpdate, + Delete: resourceAwsAppmeshVirtualRouterDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + + "mesh_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + + "spec": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_names": { + Type: schema.TypeSet, + Required: true, + MinItems: 1, + MaxItems: 10, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + }, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "created_date": { + Type: schema.TypeString, + Computed: true, + }, + + "last_updated_date": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsAppmeshVirtualRouterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + req := &appmesh.CreateVirtualRouterInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + VirtualRouterName: aws.String(d.Get("name").(string)), + Spec: expandAppmeshVirtualRouterSpec(d.Get("spec").([]interface{})), + } + + log.Printf("[DEBUG] Creating App Mesh virtual router: %#v", req) + resp, err := conn.CreateVirtualRouter(req) + if err != nil { + return fmt.Errorf("error creating App Mesh virtual router: %s", err) + } + + d.SetId(aws.StringValue(resp.VirtualRouter.Metadata.Uid)) + + return resourceAwsAppmeshVirtualRouterRead(d, meta) +} + +func resourceAwsAppmeshVirtualRouterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + if d.HasChange("spec") { + _, v := d.GetChange("spec") + req := &appmesh.UpdateVirtualRouterInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + VirtualRouterName: aws.String(d.Get("name").(string)), + Spec: expandAppmeshVirtualRouterSpec(v.([]interface{})), + } + + log.Printf("[DEBUG] Updating App Mesh virtual router: %#v", req) + _, err := conn.UpdateVirtualRouter(req) + if err != nil { + return fmt.Errorf("error updating App Mesh virtual router: %s", err) + } + } + + return resourceAwsAppmeshVirtualRouterRead(d, meta) +} + +func resourceAwsAppmeshVirtualRouterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + resp, err := conn.DescribeVirtualRouter(&appmesh.DescribeVirtualRouterInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + VirtualRouterName: aws.String(d.Get("name").(string)), + }) + if err != nil { + if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { + log.Printf("[WARN] App Mesh virtual router (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading App Mesh virtual router: %s", err) + } + if aws.StringValue(resp.VirtualRouter.Status.Status) == appmesh.VirtualRouterStatusCodeDeleted { + log.Printf("[WARN] App Mesh virtual router (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", resp.VirtualRouter.VirtualRouterName) + d.Set("mesh_name", resp.VirtualRouter.MeshName) + d.Set("arn", resp.VirtualRouter.Metadata.Arn) + d.Set("created_date", resp.VirtualRouter.Metadata.CreatedAt.Format(time.RFC3339)) + d.Set("last_updated_date", resp.VirtualRouter.Metadata.LastUpdatedAt.Format(time.RFC3339)) + if err := d.Set("spec", flattenAppmeshVirtualRouterSpec(resp.VirtualRouter.Spec)); err != nil { + return err + } + + return nil +} + +func resourceAwsAppmeshVirtualRouterDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appmeshconn + + log.Printf("[DEBUG] Deleting App Mesh virtual router: %s", d.Id()) + _, err := conn.DeleteVirtualRouter(&appmesh.DeleteVirtualRouterInput{ + MeshName: aws.String(d.Get("mesh_name").(string)), + VirtualRouterName: aws.String(d.Get("name").(string)), + }) + if err != nil { + if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting App Mesh virtual router: %s", err) + } + + return nil +} 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 e62cf330a..f440bcd47 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 @@ -108,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)) @@ -169,13 +169,13 @@ 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 @@ -201,7 +201,7 @@ func executeAndExpectMatchingRow(qeid string, dbName string, conn *athena.Athena 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 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 c5c7a4ee4..2871ef4fc 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 @@ -84,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, @@ -351,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{ @@ -385,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 { @@ -410,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 } @@ -549,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) } @@ -566,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) @@ -664,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 @@ -1133,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_batch_job_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go index b0393ce89..74eb37d74 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 @@ -138,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) } @@ -162,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), }) @@ -174,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, } @@ -183,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), @@ -196,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, } @@ -238,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 b38dc19bc..d4c368d27 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_cloudfront_origin_access_identity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go index b82296763..f568bf5dc 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_cloudtrail.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go index 8c6a1ee42..1b9896acd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go @@ -59,6 +59,11 @@ func resourceAwsCloudTrail() *schema.Resource { Optional: true, Default: false, }, + "is_organization_trail": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, "sns_topic_name": { Type: schema.TypeString, Optional: true, @@ -151,6 +156,9 @@ func resourceAwsCloudTrailCreate(d *schema.ResourceData, meta interface{}) error if v, ok := d.GetOk("is_multi_region_trail"); ok { input.IsMultiRegionTrail = aws.Bool(v.(bool)) } + if v, ok := d.GetOk("is_organization_trail"); ok { + input.IsOrganizationTrail = aws.Bool(v.(bool)) + } if v, ok := d.GetOk("enable_log_file_validation"); ok { input.EnableLogFileValidation = aws.Bool(v.(bool)) } @@ -243,6 +251,7 @@ func resourceAwsCloudTrailRead(d *schema.ResourceData, meta interface{}) error { d.Set("cloud_watch_logs_group_arn", trail.CloudWatchLogsLogGroupArn) d.Set("include_global_service_events", trail.IncludeGlobalServiceEvents) d.Set("is_multi_region_trail", trail.IsMultiRegionTrail) + d.Set("is_organization_trail", trail.IsOrganizationTrail) d.Set("sns_topic_name", trail.SnsTopicName) d.Set("enable_log_file_validation", trail.LogFileValidationEnabled) @@ -320,6 +329,9 @@ func resourceAwsCloudTrailUpdate(d *schema.ResourceData, meta interface{}) error if d.HasChange("is_multi_region_trail") { input.IsMultiRegionTrail = aws.Bool(d.Get("is_multi_region_trail").(bool)) } + if d.HasChange("is_organization_trail") { + input.IsOrganizationTrail = aws.Bool(d.Get("is_organization_trail").(bool)) + } if d.HasChange("enable_log_file_validation") { input.EnableLogFileValidation = aws.Bool(d.Get("enable_log_file_validation").(bool)) } 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 7383c6475..8457bdf0e 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 fb99dbd2c..16977cb1f 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 @@ -48,7 +48,7 @@ func resourceAwsCloudWatchEventRule() *schema.Resource { "event_pattern": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateEventPatternValue(2048), + ValidateFunc: validateEventPatternValue(), StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v.(string)) return json @@ -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_log_metric_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go index 7abaec78f..92a361266 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 @@ -71,8 +71,9 @@ func resourceAwsCloudWatchLogMetricFilter() *schema.Resource { ValidateFunc: validation.StringLenBetween(0, 100), }, "default_value": { - Type: schema.TypeFloat, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateTypeStringNullableFloat, }, }, }, @@ -92,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) } @@ -130,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_subscription_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go index c5e127339..21afba796 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 @@ -177,6 +177,9 @@ func resourceAwsCloudwatchLogSubscriptionFilterDelete(d *schema.ResourceData, me } _, err := conn.DeleteSubscriptionFilter(params) if err != nil { + if isAWSErr(err, cloudwatchlogs.ErrCodeResourceNotFoundException, "The specified log group does not exist") { + return nil + } return fmt.Errorf( "Error deleting Subscription Filter from log group: %s with name filter name %s: %+v", log_group_name, name, 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 06b5e7a39..efdf80feb 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 @@ -73,8 +73,11 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateArn, + Type: schema.TypeString, + ValidateFunc: validateAny( + validateArn, + validateEC2AutomateARN, + ), }, Set: schema.HashString, }, 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 0bf048092..bf68e62dd 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 @@ -727,9 +727,9 @@ func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSourc projectSource.Location = aws.String(data["location"].(string)) } - // Only valid for GITHUB source type, e.g. + // Only valid for BITBUCKET and GITHUB source type, e.g. // InvalidInputException: Source type GITHUB_ENTERPRISE does not support ReportBuildStatus - if sourceType == codebuild.SourceTypeGithub { + if sourceType == codebuild.SourceTypeBitbucket || sourceType == codebuild.SourceTypeGithub { projectSource.ReportBuildStatus = aws.Bool(data["report_build_status"].(bool)) } 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 97d7a9ff2..000000000 --- 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_codedeploy_app.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go index afe29c819..09c48c655 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 @@ -64,8 +64,9 @@ func resourceAwsCodeDeployApp() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ - codedeploy.ComputePlatformServer, + codedeploy.ComputePlatformEcs, codedeploy.ComputePlatformLambda, + codedeploy.ComputePlatformServer, }, false), Default: codedeploy.ComputePlatformServer, }, @@ -109,7 +110,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), @@ -167,7 +168,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 e88bef020..50aab97c0 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 @@ -27,16 +27,28 @@ func resourceAwsCodeDeployDeploymentConfig() *schema.Resource { ForceNew: true, }, + "compute_platform": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + codedeploy.ComputePlatformServer, + codedeploy.ComputePlatformLambda, + codedeploy.ComputePlatformEcs, + }, false), + Default: codedeploy.ComputePlatformServer, + }, + "minimum_healthy_hosts": { Type: schema.TypeList, - Required: true, + Optional: true, ForceNew: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ codedeploy.MinimumHealthyHostsTypeHostCount, @@ -52,6 +64,72 @@ func resourceAwsCodeDeployDeploymentConfig() *schema.Resource { }, }, + "traffic_routing_config": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + codedeploy.TrafficRoutingTypeAllAtOnce, + codedeploy.TrafficRoutingTypeTimeBasedCanary, + codedeploy.TrafficRoutingTypeTimeBasedLinear, + }, false), + Default: codedeploy.TrafficRoutingTypeAllAtOnce, + }, + + "time_based_canary": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"traffic_routing_config.0.time_based_linear"}, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "interval": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + "percentage": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + }, + }, + }, + + "time_based_linear": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"traffic_routing_config.0.time_based_canary"}, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "interval": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + "percentage": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + }, + }, + }, + }, + }, + }, + "deployment_config_id": { Type: schema.TypeString, Computed: true, @@ -65,7 +143,9 @@ func resourceAwsCodeDeployDeploymentConfigCreate(d *schema.ResourceData, meta in input := &codedeploy.CreateDeploymentConfigInput{ DeploymentConfigName: aws.String(d.Get("deployment_config_name").(string)), + ComputePlatform: aws.String(d.Get("compute_platform").(string)), MinimumHealthyHosts: expandAwsCodeDeployConfigMinimumHealthHosts(d), + TrafficRoutingConfig: expandAwsCodeDeployTrafficRoutingConfig(d), } _, err := conn.CreateDeploymentConfig(input) @@ -104,8 +184,14 @@ func resourceAwsCodeDeployDeploymentConfigRead(d *schema.ResourceData, meta inte if err := d.Set("minimum_healthy_hosts", flattenAwsCodeDeployConfigMinimumHealthHosts(resp.DeploymentConfigInfo.MinimumHealthyHosts)); err != nil { return err } + + if err := d.Set("traffic_routing_config", flattenAwsCodeDeployTrafficRoutingConfig(resp.DeploymentConfigInfo.TrafficRoutingConfig)); err != nil { + return err + } + d.Set("deployment_config_id", resp.DeploymentConfigInfo.DeploymentConfigId) d.Set("deployment_config_name", resp.DeploymentConfigInfo.DeploymentConfigName) + d.Set("compute_platform", resp.DeploymentConfigInfo.ComputePlatform) return nil } @@ -126,8 +212,11 @@ func resourceAwsCodeDeployDeploymentConfigDelete(d *schema.ResourceData, meta in } func expandAwsCodeDeployConfigMinimumHealthHosts(d *schema.ResourceData) *codedeploy.MinimumHealthyHosts { - hosts := d.Get("minimum_healthy_hosts").([]interface{}) - host := hosts[0].(map[string]interface{}) + hosts, ok := d.GetOk("minimum_healthy_hosts") + if !ok { + return nil + } + host := hosts.([]interface{})[0].(map[string]interface{}) minimumHealthyHost := codedeploy.MinimumHealthyHosts{ Type: aws.String(host["type"].(string)), @@ -137,15 +226,102 @@ func expandAwsCodeDeployConfigMinimumHealthHosts(d *schema.ResourceData) *codede return &minimumHealthyHost } +func expandAwsCodeDeployTrafficRoutingConfig(d *schema.ResourceData) *codedeploy.TrafficRoutingConfig { + block, ok := d.GetOk("traffic_routing_config") + if !ok { + return nil + } + config := block.([]interface{})[0].(map[string]interface{}) + trafficRoutingConfig := codedeploy.TrafficRoutingConfig{} + + if trafficType, ok := config["type"]; ok { + trafficRoutingConfig.Type = aws.String(trafficType.(string)) + } + if canary, ok := config["time_based_canary"]; ok && len(canary.([]interface{})) > 0 { + canaryConfig := canary.([]interface{})[0].(map[string]interface{}) + trafficRoutingConfig.TimeBasedCanary = expandAwsCodeDeployTrafficTimeBasedCanaryConfig(canaryConfig) + } + if linear, ok := config["time_based_linear"]; ok && len(linear.([]interface{})) > 0 { + linearConfig := linear.([]interface{})[0].(map[string]interface{}) + trafficRoutingConfig.TimeBasedLinear = expandAwsCodeDeployTrafficTimeBasedLinearConfig(linearConfig) + } + + return &trafficRoutingConfig +} + +func expandAwsCodeDeployTrafficTimeBasedCanaryConfig(config map[string]interface{}) *codedeploy.TimeBasedCanary { + canary := codedeploy.TimeBasedCanary{} + if interval, ok := config["interval"]; ok { + canary.CanaryInterval = aws.Int64(int64(interval.(int))) + } + if percentage, ok := config["percentage"]; ok { + canary.CanaryPercentage = aws.Int64(int64(percentage.(int))) + } + return &canary +} + +func expandAwsCodeDeployTrafficTimeBasedLinearConfig(config map[string]interface{}) *codedeploy.TimeBasedLinear { + linear := codedeploy.TimeBasedLinear{} + if interval, ok := config["interval"]; ok { + linear.LinearInterval = aws.Int64(int64(interval.(int))) + } + if percentage, ok := config["percentage"]; ok { + linear.LinearPercentage = aws.Int64(int64(percentage.(int))) + } + return &linear +} + func flattenAwsCodeDeployConfigMinimumHealthHosts(hosts *codedeploy.MinimumHealthyHosts) []map[string]interface{} { result := make([]map[string]interface{}, 0) + if hosts == nil { + return result + } item := make(map[string]interface{}) - item["type"] = *hosts.Type - item["value"] = *hosts.Value + item["type"] = aws.StringValue(hosts.Type) + item["value"] = aws.Int64Value(hosts.Value) - result = append(result, item) - - return result + return append(result, item) +} + +func flattenAwsCodeDeployTrafficRoutingConfig(config *codedeploy.TrafficRoutingConfig) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + if config == nil { + return result + } + + item := make(map[string]interface{}) + + item["type"] = aws.StringValue(config.Type) + item["time_based_canary"] = flattenAwsCodeDeployTrafficRoutingCanaryConfig(config.TimeBasedCanary) + item["time_based_linear"] = flattenAwsCodeDeployTrafficRoutingLinearConfig(config.TimeBasedLinear) + + return append(result, item) +} + +func flattenAwsCodeDeployTrafficRoutingCanaryConfig(canary *codedeploy.TimeBasedCanary) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + if canary == nil { + return result + } + + item := make(map[string]interface{}) + item["interval"] = aws.Int64Value(canary.CanaryInterval) + item["percentage"] = aws.Int64Value(canary.CanaryPercentage) + + return append(result, item) +} + +func flattenAwsCodeDeployTrafficRoutingLinearConfig(linear *codedeploy.TimeBasedLinear) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + if linear == nil { + return result + } + + item := make(map[string]interface{}) + item["interval"] = aws.Int64Value(linear.LinearInterval) + item["percentage"] = aws.Int64Value(linear.LinearPercentage) + + return append(result, item) } 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 5e034d340..28d934de2 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 @@ -242,6 +242,60 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { }, }, }, + + "target_group_pair_info": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "prod_traffic_route": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "listener_arns": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "target_group": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 2, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + }, + }, + "test_traffic_route": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "listener_arns": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + }, + }, + }, }, }, }, @@ -340,6 +394,26 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { Set: resourceAwsCodeDeployTagFilterHash, }, + "ecs_service": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cluster_name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + "service_name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + }, + }, + "on_premises_instance_tag_filter": { Type: schema.TypeSet, Optional: true, @@ -447,6 +521,10 @@ func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta int input.Ec2TagFilters = buildEC2TagFilters(attr.(*schema.Set).List()) } + if attr, ok := d.GetOk("ecs_service"); ok { + input.EcsServices = expandCodeDeployEcsServices(attr.([]interface{})) + } + if attr, ok := d.GetOk("trigger_configuration"); ok { triggerConfigs := buildTriggerConfigs(attr.(*schema.Set).List()) input.TriggerConfigurations = triggerConfigs @@ -531,6 +609,10 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter return err } + if err := d.Set("ecs_service", flattenCodeDeployEcsServices(resp.DeploymentGroupInfo.EcsServices)); err != nil { + return fmt.Errorf("error setting ecs_service: %s", err) + } + if err := d.Set("on_premises_instance_tag_filter", onPremisesTagFiltersToMap(resp.DeploymentGroupInfo.OnPremisesInstanceTagFilters)); err != nil { return err } @@ -612,6 +694,10 @@ func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta int input.Ec2TagFilters = ec2Filters } + if d.HasChange("ecs_service") { + input.EcsServices = expandCodeDeployEcsServices(d.Get("ecs_service").([]interface{})) + } + if d.HasChange("trigger_configuration") { _, n := d.GetChange("trigger_configuration") triggerConfigs := buildTriggerConfigs(n.(*schema.Set).List()) @@ -824,6 +910,103 @@ func buildAlarmConfig(configured []interface{}) *codedeploy.AlarmConfiguration { return result } +func expandCodeDeployEcsServices(l []interface{}) []*codedeploy.ECSService { + ecsServices := make([]*codedeploy.ECSService, 0) + + for _, mRaw := range l { + if mRaw == nil { + continue + } + + m := mRaw.(map[string]interface{}) + + ecsService := &codedeploy.ECSService{ + ClusterName: aws.String(m["cluster_name"].(string)), + ServiceName: aws.String(m["service_name"].(string)), + } + + ecsServices = append(ecsServices, ecsService) + } + + return ecsServices +} + +func expandCodeDeployElbInfo(l []interface{}) []*codedeploy.ELBInfo { + elbInfos := []*codedeploy.ELBInfo{} + + for _, mRaw := range l { + if mRaw == nil { + continue + } + + m := mRaw.(map[string]interface{}) + + elbInfo := &codedeploy.ELBInfo{ + Name: aws.String(m["name"].(string)), + } + + elbInfos = append(elbInfos, elbInfo) + } + + return elbInfos +} + +func expandCodeDeployTargetGroupInfo(l []interface{}) []*codedeploy.TargetGroupInfo { + targetGroupInfos := []*codedeploy.TargetGroupInfo{} + + for _, mRaw := range l { + if mRaw == nil { + continue + } + + m := mRaw.(map[string]interface{}) + + targetGroupInfo := &codedeploy.TargetGroupInfo{ + Name: aws.String(m["name"].(string)), + } + + targetGroupInfos = append(targetGroupInfos, targetGroupInfo) + } + + return targetGroupInfos +} + +func expandCodeDeployTargetGroupPairInfo(l []interface{}) []*codedeploy.TargetGroupPairInfo { + targetGroupPairInfos := []*codedeploy.TargetGroupPairInfo{} + + for _, mRaw := range l { + if mRaw == nil { + continue + } + + m := mRaw.(map[string]interface{}) + + targetGroupPairInfo := &codedeploy.TargetGroupPairInfo{ + ProdTrafficRoute: expandCodeDeployTrafficRoute(m["prod_traffic_route"].([]interface{})), + TargetGroups: expandCodeDeployTargetGroupInfo(m["target_group"].([]interface{})), + TestTrafficRoute: expandCodeDeployTrafficRoute(m["test_traffic_route"].([]interface{})), + } + + targetGroupPairInfos = append(targetGroupPairInfos, targetGroupPairInfo) + } + + return targetGroupPairInfos +} + +func expandCodeDeployTrafficRoute(l []interface{}) *codedeploy.TrafficRoute { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + trafficRoute := &codedeploy.TrafficRoute{ + ListenerArns: expandStringSet(m["listener_arns"].(*schema.Set)), + } + + return trafficRoute +} + // expandDeploymentStyle converts a raw schema list containing a map[string]interface{} // into a single codedeploy.DeploymentStyle object func expandDeploymentStyle(list []interface{}) *codedeploy.DeploymentStyle { @@ -854,38 +1037,16 @@ func expandLoadBalancerInfo(list []interface{}) *codedeploy.LoadBalancerInfo { lbInfo := list[0].(map[string]interface{}) loadBalancerInfo := &codedeploy.LoadBalancerInfo{} - if attr, ok := lbInfo["elb_info"]; ok { - elbs := attr.(*schema.Set).List() - loadBalancerInfo.ElbInfoList = make([]*codedeploy.ELBInfo, 0, len(elbs)) - - for _, v := range elbs { - elb := v.(map[string]interface{}) - name, ok := elb["name"].(string) - if !ok { - continue - } - - loadBalancerInfo.ElbInfoList = append(loadBalancerInfo.ElbInfoList, &codedeploy.ELBInfo{ - Name: aws.String(name), - }) - } + if attr, ok := lbInfo["elb_info"]; ok && attr.(*schema.Set).Len() > 0 { + loadBalancerInfo.ElbInfoList = expandCodeDeployElbInfo(attr.(*schema.Set).List()) } - if attr, ok := lbInfo["target_group_info"]; ok { - targetGroups := attr.(*schema.Set).List() - loadBalancerInfo.TargetGroupInfoList = make([]*codedeploy.TargetGroupInfo, 0, len(targetGroups)) + if attr, ok := lbInfo["target_group_info"]; ok && attr.(*schema.Set).Len() > 0 { + loadBalancerInfo.TargetGroupInfoList = expandCodeDeployTargetGroupInfo(attr.(*schema.Set).List()) + } - for _, v := range targetGroups { - targetGroup := v.(map[string]interface{}) - name, ok := targetGroup["name"].(string) - if !ok { - continue - } - - loadBalancerInfo.TargetGroupInfoList = append(loadBalancerInfo.TargetGroupInfoList, &codedeploy.TargetGroupInfo{ - Name: aws.String(name), - }) - } + if attr, ok := lbInfo["target_group_pair_info"]; ok && len(attr.([]interface{})) > 0 { + loadBalancerInfo.TargetGroupPairInfoList = expandCodeDeployTargetGroupPairInfo(attr.([]interface{})) } return loadBalancerInfo @@ -1066,6 +1227,93 @@ func alarmConfigToMap(config *codedeploy.AlarmConfiguration) []map[string]interf return result } +func flattenCodeDeployEcsServices(ecsServices []*codedeploy.ECSService) []interface{} { + l := make([]interface{}, 0) + + for _, ecsService := range ecsServices { + if ecsService == nil { + continue + } + + m := map[string]interface{}{ + "cluster_name": aws.StringValue(ecsService.ClusterName), + "service_name": aws.StringValue(ecsService.ServiceName), + } + + l = append(l, m) + } + + return l +} + +func flattenCodeDeployElbInfo(elbInfos []*codedeploy.ELBInfo) []interface{} { + l := make([]interface{}, 0) + + for _, elbInfo := range elbInfos { + if elbInfo == nil { + continue + } + + m := map[string]interface{}{ + "name": aws.StringValue(elbInfo.Name), + } + + l = append(l, m) + } + + return l +} + +func flattenCodeDeployTargetGroupInfo(targetGroupInfos []*codedeploy.TargetGroupInfo) []interface{} { + l := make([]interface{}, 0) + + for _, targetGroupInfo := range targetGroupInfos { + if targetGroupInfo == nil { + continue + } + + m := map[string]interface{}{ + "name": aws.StringValue(targetGroupInfo.Name), + } + + l = append(l, m) + } + + return l +} + +func flattenCodeDeployTargetGroupPairInfo(targetGroupPairInfos []*codedeploy.TargetGroupPairInfo) []interface{} { + l := make([]interface{}, 0) + + for _, targetGroupPairInfo := range targetGroupPairInfos { + if targetGroupPairInfo == nil { + continue + } + + m := map[string]interface{}{ + "prod_traffic_route": flattenCodeDeployTrafficRoute(targetGroupPairInfo.ProdTrafficRoute), + "target_group": flattenCodeDeployTargetGroupInfo(targetGroupPairInfo.TargetGroups), + "test_traffic_route": flattenCodeDeployTrafficRoute(targetGroupPairInfo.TestTrafficRoute), + } + + l = append(l, m) + } + + return l +} + +func flattenCodeDeployTrafficRoute(trafficRoute *codedeploy.TrafficRoute) []interface{} { + if trafficRoute == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "listener_arns": schema.NewSet(schema.HashString, flattenStringList(trafficRoute.ListenerArns)), + } + + return []interface{}{m} +} + // flattenDeploymentStyle converts a codedeploy.DeploymentStyle object // into a []map[string]interface{} list containing a single item func flattenDeploymentStyle(style *codedeploy.DeploymentStyle) []map[string]interface{} { @@ -1086,40 +1334,18 @@ func flattenDeploymentStyle(style *codedeploy.DeploymentStyle) []map[string]inte return result } -// flattenLoadBalancerInfo converts a codedeploy.LoadBalancerInfo object -// into a []map[string]interface{} list containing a single item -func flattenLoadBalancerInfo(loadBalancerInfo *codedeploy.LoadBalancerInfo) []map[string]interface{} { +func flattenLoadBalancerInfo(loadBalancerInfo *codedeploy.LoadBalancerInfo) []interface{} { if loadBalancerInfo == nil { - return nil + return []interface{}{} } - elbs := make([]interface{}, 0, len(loadBalancerInfo.ElbInfoList)) - for _, elb := range loadBalancerInfo.ElbInfoList { - if elb.Name == nil { - continue - } - item := make(map[string]interface{}) - item["name"] = *elb.Name - elbs = append(elbs, item) + m := map[string]interface{}{ + "elb_info": schema.NewSet(loadBalancerInfoHash, flattenCodeDeployElbInfo(loadBalancerInfo.ElbInfoList)), + "target_group_info": schema.NewSet(loadBalancerInfoHash, flattenCodeDeployTargetGroupInfo(loadBalancerInfo.TargetGroupInfoList)), + "target_group_pair_info": flattenCodeDeployTargetGroupPairInfo(loadBalancerInfo.TargetGroupPairInfoList), } - targetGroups := make([]interface{}, 0, len(loadBalancerInfo.TargetGroupInfoList)) - for _, targetGroup := range loadBalancerInfo.TargetGroupInfoList { - if targetGroup.Name == nil { - continue - } - item := make(map[string]interface{}) - item["name"] = *targetGroup.Name - targetGroups = append(targetGroups, item) - } - - lbInfo := make(map[string]interface{}) - lbInfo["elb_info"] = schema.NewSet(loadBalancerInfoHash, elbs) - lbInfo["target_group_info"] = schema.NewSet(loadBalancerInfoHash, targetGroups) - - result := make([]map[string]interface{}, 0, 1) - result = append(result, lbInfo) - return result + return []interface{}{m} } // flattenBlueGreenDeploymentConfig converts a codedeploy.BlueGreenDeploymentConfiguration object 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 fd1481c0f..654ef12c4 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{ 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 index 4acb2bce0..99357ca1b 100644 --- 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 @@ -4,13 +4,11 @@ import ( "fmt" "log" - "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/service/codepipeline" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCodePipelineWebhook() *schema.Resource { @@ -19,6 +17,9 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { Read: resourceAwsCodePipelineWebhookRead, Update: nil, Delete: resourceAwsCodePipelineWebhookDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "authentication": { 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 2212afda4..0b62891cd 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) } @@ -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_pool_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go index 08c70a478..83a35b8c8 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_datasync_agent.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_agent.go new file mode 100644 index 000000000..d79a35da8 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_agent.go @@ -0,0 +1,270 @@ +package aws + +import ( + "fmt" + "log" + "net" + "net/http" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/datasync" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDataSyncAgent() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDataSyncAgentCreate, + Read: resourceAwsDataSyncAgentRead, + Update: resourceAwsDataSyncAgentUpdate, + Delete: resourceAwsDataSyncAgentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "activation_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"ip_address"}, + }, + "ip_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"activation_key"}, + }, + "name": { + Type: schema.TypeString, + Optional: true, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsDataSyncAgentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + region := meta.(*AWSClient).region + + activationKey := d.Get("activation_key").(string) + agentIpAddress := d.Get("ip_address").(string) + + // Perform one time fetch of activation key from gateway IP address + if activationKey == "" { + if agentIpAddress == "" { + return fmt.Errorf("either activation_key or ip_address must be provided") + } + + client := &http.Client{ + CheckRedirect: func(req *http.Request, via []*http.Request) error { + return http.ErrUseLastResponse + }, + Timeout: time.Second * 10, + } + + requestURL := fmt.Sprintf("http://%s/?gatewayType=SYNC&activationRegion=%s", agentIpAddress, region) + log.Printf("[DEBUG] Creating HTTP request: %s", requestURL) + request, err := http.NewRequest("GET", requestURL, nil) + if err != nil { + return fmt.Errorf("error creating HTTP request: %s", err) + } + + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + log.Printf("[DEBUG] Making HTTP request: %s", request.URL.String()) + response, err := client.Do(request) + if err != nil { + if err, ok := err.(net.Error); ok { + errMessage := fmt.Errorf("error making HTTP request: %s", err) + log.Printf("[DEBUG] retryable %s", errMessage) + return resource.RetryableError(errMessage) + } + return resource.NonRetryableError(fmt.Errorf("error making HTTP request: %s", err)) + } + + log.Printf("[DEBUG] Received HTTP response: %#v", response) + if response.StatusCode != 302 { + return resource.NonRetryableError(fmt.Errorf("expected HTTP status code 302, received: %d", response.StatusCode)) + } + + redirectURL, err := response.Location() + if err != nil { + return resource.NonRetryableError(fmt.Errorf("error extracting HTTP Location header: %s", err)) + } + + activationKey = redirectURL.Query().Get("activationKey") + + return nil + }) + if err != nil { + return fmt.Errorf("error retrieving activation key from IP Address (%s): %s", agentIpAddress, err) + } + if activationKey == "" { + return fmt.Errorf("empty activationKey received from IP Address: %s", agentIpAddress) + } + } + + input := &datasync.CreateAgentInput{ + ActivationKey: aws.String(activationKey), + Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), + } + + if v, ok := d.GetOk("name"); ok { + input.AgentName = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating DataSync Agent: %s", input) + output, err := conn.CreateAgent(input) + if err != nil { + return fmt.Errorf("error creating DataSync Agent: %s", err) + } + + d.SetId(aws.StringValue(output.AgentArn)) + + // Agent activations can take a few minutes + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + _, err := conn.DescribeAgent(&datasync.DescribeAgentInput{ + AgentArn: aws.String(d.Id()), + }) + + if isAWSErr(err, "InvalidRequestException", "not found") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { + return fmt.Errorf("error waiting for DataSync Agent (%s) creation: %s", d.Id(), err) + } + + return resourceAwsDataSyncAgentRead(d, meta) +} + +func resourceAwsDataSyncAgentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DescribeAgentInput{ + AgentArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading DataSync Agent: %s", input) + output, err := conn.DescribeAgent(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + log.Printf("[WARN] DataSync Agent %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading DataSync Agent (%s): %s", d.Id(), err) + } + + tagsInput := &datasync.ListTagsForResourceInput{ + ResourceArn: output.AgentArn, + } + + log.Printf("[DEBUG] Reading DataSync Agent tags: %s", tagsInput) + tagsOutput, err := conn.ListTagsForResource(tagsInput) + + if err != nil { + return fmt.Errorf("error reading DataSync Agent (%s) tags: %s", d.Id(), err) + } + + d.Set("arn", output.AgentArn) + d.Set("name", output.Name) + + if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsDataSyncAgentUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + if d.HasChange("name") { + input := &datasync.UpdateAgentInput{ + AgentArn: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + } + + log.Printf("[DEBUG] Updating DataSync Agent: %s", input) + _, err := conn.UpdateAgent(input) + if err != nil { + return fmt.Errorf("error updating DataSync Agent (%s): %s", d.Id(), err) + } + } + + if d.HasChange("tags") { + oldRaw, newRaw := d.GetChange("tags") + createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) + + if len(removeTags) > 0 { + input := &datasync.UntagResourceInput{ + Keys: dataSyncTagsKeys(removeTags), + ResourceArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Untagging DataSync Agent: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging DataSync Agent (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &datasync.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging DataSync Agent: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging DataSync Agent (%s): %s", d.Id(), err) + } + } + } + + return resourceAwsDataSyncAgentRead(d, meta) +} + +func resourceAwsDataSyncAgentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DeleteAgentInput{ + AgentArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting DataSync Agent: %s", input) + _, err := conn.DeleteAgent(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting DataSync Agent (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_efs.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_efs.go new file mode 100644 index 000000000..3e53d7f87 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_efs.go @@ -0,0 +1,215 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/datasync" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDataSyncLocationEfs() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDataSyncLocationEfsCreate, + Read: resourceAwsDataSyncLocationEfsRead, + Update: resourceAwsDataSyncLocationEfsUpdate, + Delete: resourceAwsDataSyncLocationEfsDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "ec2_config": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "security_group_arns": { + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "subnet_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + }, + }, + "efs_file_system_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "subdirectory": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "/", + // Ignore missing trailing slash + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if new == "/" { + return false + } + if strings.TrimSuffix(old, "/") == strings.TrimSuffix(new, "/") { + return true + } + return false + }, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "uri": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsDataSyncLocationEfsCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.CreateLocationEfsInput{ + Ec2Config: expandDataSyncEc2Config(d.Get("ec2_config").([]interface{})), + EfsFilesystemArn: aws.String(d.Get("efs_file_system_arn").(string)), + Subdirectory: aws.String(d.Get("subdirectory").(string)), + Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), + } + + log.Printf("[DEBUG] Creating DataSync Location EFS: %s", input) + output, err := conn.CreateLocationEfs(input) + if err != nil { + return fmt.Errorf("error creating DataSync Location EFS: %s", err) + } + + d.SetId(aws.StringValue(output.LocationArn)) + + return resourceAwsDataSyncLocationEfsRead(d, meta) +} + +func resourceAwsDataSyncLocationEfsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DescribeLocationEfsInput{ + LocationArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading DataSync Location EFS: %s", input) + output, err := conn.DescribeLocationEfs(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + log.Printf("[WARN] DataSync Location EFS %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading DataSync Location EFS (%s): %s", d.Id(), err) + } + + tagsInput := &datasync.ListTagsForResourceInput{ + ResourceArn: output.LocationArn, + } + + log.Printf("[DEBUG] Reading DataSync Location EFS tags: %s", tagsInput) + tagsOutput, err := conn.ListTagsForResource(tagsInput) + + if err != nil { + return fmt.Errorf("error reading DataSync Location EFS (%s) tags: %s", d.Id(), err) + } + + subdirectory, err := dataSyncParseLocationURI(aws.StringValue(output.LocationUri)) + + if err != nil { + return fmt.Errorf("error parsing Location EFS (%s) URI (%s): %s", d.Id(), aws.StringValue(output.LocationUri), err) + } + + d.Set("arn", output.LocationArn) + + if err := d.Set("ec2_config", flattenDataSyncEc2Config(output.Ec2Config)); err != nil { + return fmt.Errorf("error setting ec2_config: %s", err) + } + + d.Set("subdirectory", subdirectory) + + if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("uri", output.LocationUri) + + return nil +} + +func resourceAwsDataSyncLocationEfsUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + if d.HasChange("tags") { + oldRaw, newRaw := d.GetChange("tags") + createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) + + if len(removeTags) > 0 { + input := &datasync.UntagResourceInput{ + Keys: dataSyncTagsKeys(removeTags), + ResourceArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Untagging DataSync Location EFS: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging DataSync Location EFS (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &datasync.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging DataSync Location EFS: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging DataSync Location EFS (%s): %s", d.Id(), err) + } + } + } + + return resourceAwsDataSyncLocationEfsRead(d, meta) +} + +func resourceAwsDataSyncLocationEfsDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DeleteLocationInput{ + LocationArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting DataSync Location EFS: %s", input) + _, err := conn.DeleteLocation(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting DataSync Location EFS (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_nfs.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_nfs.go new file mode 100644 index 000000000..56e8c1194 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_nfs.go @@ -0,0 +1,208 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/datasync" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDataSyncLocationNfs() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDataSyncLocationNfsCreate, + Read: resourceAwsDataSyncLocationNfsRead, + Update: resourceAwsDataSyncLocationNfsUpdate, + Delete: resourceAwsDataSyncLocationNfsDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "on_prem_config": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "agent_arns": { + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "server_hostname": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "subdirectory": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + // Ignore missing trailing slash + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if new == "/" { + return false + } + if strings.TrimSuffix(old, "/") == strings.TrimSuffix(new, "/") { + return true + } + return false + }, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "uri": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsDataSyncLocationNfsCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.CreateLocationNfsInput{ + OnPremConfig: expandDataSyncOnPremConfig(d.Get("on_prem_config").([]interface{})), + ServerHostname: aws.String(d.Get("server_hostname").(string)), + Subdirectory: aws.String(d.Get("subdirectory").(string)), + Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), + } + + log.Printf("[DEBUG] Creating DataSync Location NFS: %s", input) + output, err := conn.CreateLocationNfs(input) + if err != nil { + return fmt.Errorf("error creating DataSync Location NFS: %s", err) + } + + d.SetId(aws.StringValue(output.LocationArn)) + + return resourceAwsDataSyncLocationNfsRead(d, meta) +} + +func resourceAwsDataSyncLocationNfsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DescribeLocationNfsInput{ + LocationArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading DataSync Location NFS: %s", input) + output, err := conn.DescribeLocationNfs(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + log.Printf("[WARN] DataSync Location NFS %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading DataSync Location NFS (%s): %s", d.Id(), err) + } + + tagsInput := &datasync.ListTagsForResourceInput{ + ResourceArn: output.LocationArn, + } + + log.Printf("[DEBUG] Reading DataSync Location NFS tags: %s", tagsInput) + tagsOutput, err := conn.ListTagsForResource(tagsInput) + + if err != nil { + return fmt.Errorf("error reading DataSync Location NFS (%s) tags: %s", d.Id(), err) + } + + subdirectory, err := dataSyncParseLocationURI(aws.StringValue(output.LocationUri)) + + if err != nil { + return fmt.Errorf("error parsing Location NFS (%s) URI (%s): %s", d.Id(), aws.StringValue(output.LocationUri), err) + } + + d.Set("arn", output.LocationArn) + + if err := d.Set("on_prem_config", flattenDataSyncOnPremConfig(output.OnPremConfig)); err != nil { + return fmt.Errorf("error setting on_prem_config: %s", err) + } + + d.Set("subdirectory", subdirectory) + + if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("uri", output.LocationUri) + + return nil +} + +func resourceAwsDataSyncLocationNfsUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + if d.HasChange("tags") { + oldRaw, newRaw := d.GetChange("tags") + createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) + + if len(removeTags) > 0 { + input := &datasync.UntagResourceInput{ + Keys: dataSyncTagsKeys(removeTags), + ResourceArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Untagging DataSync Location NFS: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging DataSync Location NFS (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &datasync.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging DataSync Location NFS: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging DataSync Location NFS (%s): %s", d.Id(), err) + } + } + } + + return resourceAwsDataSyncLocationNfsRead(d, meta) +} + +func resourceAwsDataSyncLocationNfsDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DeleteLocationInput{ + LocationArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting DataSync Location NFS: %s", input) + _, err := conn.DeleteLocation(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting DataSync Location NFS (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_s3.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_s3.go new file mode 100644 index 000000000..8f8cda3a5 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_s3.go @@ -0,0 +1,208 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/datasync" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDataSyncLocationS3() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDataSyncLocationS3Create, + Read: resourceAwsDataSyncLocationS3Read, + Update: resourceAwsDataSyncLocationS3Update, + Delete: resourceAwsDataSyncLocationS3Delete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "s3_bucket_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "s3_config": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket_access_role_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + }, + }, + "subdirectory": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + // Ignore missing trailing slash + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if new == "/" { + return false + } + if strings.TrimSuffix(old, "/") == strings.TrimSuffix(new, "/") { + return true + } + return false + }, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "uri": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsDataSyncLocationS3Create(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.CreateLocationS3Input{ + S3BucketArn: aws.String(d.Get("s3_bucket_arn").(string)), + S3Config: expandDataSyncS3Config(d.Get("s3_config").([]interface{})), + Subdirectory: aws.String(d.Get("subdirectory").(string)), + Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), + } + + log.Printf("[DEBUG] Creating DataSync Location S3: %s", input) + output, err := conn.CreateLocationS3(input) + if err != nil { + return fmt.Errorf("error creating DataSync Location S3: %s", err) + } + + d.SetId(aws.StringValue(output.LocationArn)) + + return resourceAwsDataSyncLocationS3Read(d, meta) +} + +func resourceAwsDataSyncLocationS3Read(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DescribeLocationS3Input{ + LocationArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading DataSync Location S3: %s", input) + output, err := conn.DescribeLocationS3(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + log.Printf("[WARN] DataSync Location S3 %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading DataSync Location S3 (%s): %s", d.Id(), err) + } + + tagsInput := &datasync.ListTagsForResourceInput{ + ResourceArn: output.LocationArn, + } + + log.Printf("[DEBUG] Reading DataSync Location S3 tags: %s", tagsInput) + tagsOutput, err := conn.ListTagsForResource(tagsInput) + + if err != nil { + return fmt.Errorf("error reading DataSync Location S3 (%s) tags: %s", d.Id(), err) + } + + subdirectory, err := dataSyncParseLocationURI(aws.StringValue(output.LocationUri)) + + if err != nil { + return fmt.Errorf("error parsing Location S3 (%s) URI (%s): %s", d.Id(), aws.StringValue(output.LocationUri), err) + } + + d.Set("arn", output.LocationArn) + + if err := d.Set("s3_config", flattenDataSyncS3Config(output.S3Config)); err != nil { + return fmt.Errorf("error setting s3_config: %s", err) + } + + d.Set("subdirectory", subdirectory) + + if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("uri", output.LocationUri) + + return nil +} + +func resourceAwsDataSyncLocationS3Update(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + if d.HasChange("tags") { + oldRaw, newRaw := d.GetChange("tags") + createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) + + if len(removeTags) > 0 { + input := &datasync.UntagResourceInput{ + Keys: dataSyncTagsKeys(removeTags), + ResourceArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Untagging DataSync Location S3: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging DataSync Location S3 (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &datasync.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging DataSync Location S3: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging DataSync Location S3 (%s): %s", d.Id(), err) + } + } + } + + return resourceAwsDataSyncLocationS3Read(d, meta) +} + +func resourceAwsDataSyncLocationS3Delete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DeleteLocationInput{ + LocationArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting DataSync Location S3: %s", input) + _, err := conn.DeleteLocation(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting DataSync Location S3 (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_task.go new file mode 100644 index 000000000..49d846cf5 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_task.go @@ -0,0 +1,339 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/resource" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/datasync" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDataSyncTask() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDataSyncTaskCreate, + Read: resourceAwsDataSyncTaskRead, + Update: resourceAwsDataSyncTaskUpdate, + Delete: resourceAwsDataSyncTaskDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "cloudwatch_log_group_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "destination_location_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "name": { + Type: schema.TypeString, + Optional: true, + }, + "options": { + 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{ + "atime": { + Type: schema.TypeString, + Optional: true, + Default: datasync.AtimeBestEffort, + ValidateFunc: validation.StringInSlice([]string{ + datasync.AtimeBestEffort, + datasync.AtimeNone, + }, false), + }, + "bytes_per_second": { + Type: schema.TypeInt, + Optional: true, + Default: -1, + ValidateFunc: validation.IntAtLeast(-1), + }, + "gid": { + Type: schema.TypeString, + Optional: true, + Default: datasync.GidIntValue, + ValidateFunc: validation.StringInSlice([]string{ + datasync.GidBoth, + datasync.GidIntValue, + datasync.GidName, + datasync.GidNone, + }, false), + }, + "mtime": { + Type: schema.TypeString, + Optional: true, + Default: datasync.MtimePreserve, + ValidateFunc: validation.StringInSlice([]string{ + datasync.MtimeNone, + datasync.MtimePreserve, + }, false), + }, + "posix_permissions": { + Type: schema.TypeString, + Optional: true, + Default: datasync.PosixPermissionsPreserve, + ValidateFunc: validation.StringInSlice([]string{ + datasync.PosixPermissionsBestEffort, + datasync.PosixPermissionsNone, + datasync.PosixPermissionsPreserve, + }, false), + }, + "preserve_deleted_files": { + Type: schema.TypeString, + Optional: true, + Default: datasync.PreserveDeletedFilesPreserve, + ValidateFunc: validation.StringInSlice([]string{ + datasync.PreserveDeletedFilesPreserve, + datasync.PreserveDeletedFilesRemove, + }, false), + }, + "preserve_devices": { + Type: schema.TypeString, + Optional: true, + Default: datasync.PreserveDevicesNone, + ValidateFunc: validation.StringInSlice([]string{ + datasync.PreserveDevicesNone, + datasync.PreserveDevicesPreserve, + }, false), + }, + "uid": { + Type: schema.TypeString, + Optional: true, + Default: datasync.UidIntValue, + ValidateFunc: validation.StringInSlice([]string{ + datasync.UidBoth, + datasync.UidIntValue, + datasync.UidName, + datasync.UidNone, + }, false), + }, + "verify_mode": { + Type: schema.TypeString, + Optional: true, + Default: datasync.VerifyModePointInTimeConsistent, + ValidateFunc: validation.StringInSlice([]string{ + datasync.VerifyModeNone, + datasync.VerifyModePointInTimeConsistent, + }, false), + }, + }, + }, + }, + "source_location_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsDataSyncTaskCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.CreateTaskInput{ + DestinationLocationArn: aws.String(d.Get("destination_location_arn").(string)), + Options: expandDataSyncOptions(d.Get("options").([]interface{})), + SourceLocationArn: aws.String(d.Get("source_location_arn").(string)), + Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), + } + + if v, ok := d.GetOk("cloudwatch_log_group_arn"); ok { + input.CloudWatchLogGroupArn = aws.String(v.(string)) + } + + if v, ok := d.GetOk("name"); ok { + input.Name = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating DataSync Task: %s", input) + output, err := conn.CreateTask(input) + if err != nil { + return fmt.Errorf("error creating DataSync Task: %s", err) + } + + d.SetId(aws.StringValue(output.TaskArn)) + + // Task creation can take a few minutes + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + output, err := conn.DescribeTask(&datasync.DescribeTaskInput{ + TaskArn: aws.String(d.Id()), + }) + + if isAWSErr(err, "InvalidRequestException", "not found") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + if aws.StringValue(output.Status) == datasync.TaskStatusAvailable || aws.StringValue(output.Status) == datasync.TaskStatusRunning { + return nil + } + + err = fmt.Errorf("waiting for DataSync Task (%s) creation: last status (%s), error code (%s), error detail: %s", + d.Id(), aws.StringValue(output.Status), aws.StringValue(output.ErrorCode), aws.StringValue(output.ErrorDetail)) + + if aws.StringValue(output.Status) == datasync.TaskStatusCreating { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + }) + if err != nil { + return fmt.Errorf("error waiting for DataSync Task (%s) creation: %s", d.Id(), err) + } + + return resourceAwsDataSyncTaskRead(d, meta) +} + +func resourceAwsDataSyncTaskRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DescribeTaskInput{ + TaskArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading DataSync Task: %s", input) + output, err := conn.DescribeTask(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + log.Printf("[WARN] DataSync Task %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading DataSync Task (%s): %s", d.Id(), err) + } + + tagsInput := &datasync.ListTagsForResourceInput{ + ResourceArn: output.TaskArn, + } + + log.Printf("[DEBUG] Reading DataSync Task tags: %s", tagsInput) + tagsOutput, err := conn.ListTagsForResource(tagsInput) + + if err != nil { + return fmt.Errorf("error reading DataSync Task (%s) tags: %s", d.Id(), err) + } + + d.Set("arn", output.TaskArn) + d.Set("cloudwatch_log_group_arn", output.CloudWatchLogGroupArn) + d.Set("destination_location_arn", output.DestinationLocationArn) + d.Set("name", output.Name) + + if err := d.Set("options", flattenDataSyncOptions(output.Options)); err != nil { + return fmt.Errorf("error setting options: %s", err) + } + + d.Set("source_location_arn", output.SourceLocationArn) + + if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsDataSyncTaskUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + if d.HasChange("options") || d.HasChange("name") { + input := &datasync.UpdateTaskInput{ + Options: expandDataSyncOptions(d.Get("options").([]interface{})), + Name: aws.String(d.Get("name").(string)), + TaskArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Updating DataSync Task: %s", input) + if _, err := conn.UpdateTask(input); err != nil { + return fmt.Errorf("error creating DataSync Task: %s", err) + } + } + + if d.HasChange("tags") { + oldRaw, newRaw := d.GetChange("tags") + createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) + + if len(removeTags) > 0 { + input := &datasync.UntagResourceInput{ + Keys: dataSyncTagsKeys(removeTags), + ResourceArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Untagging DataSync Task: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging DataSync Task (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &datasync.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging DataSync Task: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging DataSync Task (%s): %s", d.Id(), err) + } + } + } + + return resourceAwsDataSyncTaskRead(d, meta) +} + +func resourceAwsDataSyncTaskDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).datasyncconn + + input := &datasync.DeleteTaskInput{ + TaskArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting DataSync Task: %s", input) + _, err := conn.DeleteTask(input) + + if isAWSErr(err, "InvalidRequestException", "not found") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting DataSync Task (%s): %s", d.Id(), err) + } + + return nil +} 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 b7cd598ca..2ae0ee2b4 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 @@ -408,6 +408,8 @@ func resourceAwsDbInstance() *schema.Resource { "listener", "slowquery", "trace", + "postgresql", + "upgrade", }, false), }, }, @@ -1612,6 +1614,7 @@ func diffCloudwatchLogsExportConfiguration(old, new []interface{}) ([]interface{ var resourceAwsDbInstanceCreatePendingStates = []string{ "backing-up", "configuring-enhanced-monitoring", + "configuring-iam-database-auth", "configuring-log-exports", "creating", "maintenance", @@ -1642,6 +1645,7 @@ var resourceAwsDbInstanceDeletePendingStates = []string{ var resourceAwsDbInstanceUpdatePendingStates = []string{ "backing-up", "configuring-enhanced-monitoring", + "configuring-iam-database-auth", "configuring-log-exports", "creating", "maintenance", 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 16b4ae0c4..3ec1e20a7 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 @@ -146,6 +146,11 @@ func resourceAwsDefaultNetworkAcl() *schema.Resource { }, "tags": tagsSchema(), + + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go index c372ed347..43e24fc22 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go @@ -71,6 +71,11 @@ func resourceAwsDefaultRouteTable() *schema.Resource { Optional: true, }, + "transit_gateway_id": { + Type: schema.TypeString, + Optional: true, + }, + "vpc_peering_connection_id": { Type: schema.TypeString, Optional: true, @@ -86,6 +91,11 @@ func resourceAwsDefaultRouteTable() *schema.Resource { }, "tags": tagsSchema(), + + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go index 932d8d23d..443ed252a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go @@ -15,11 +15,16 @@ func resourceAwsDefaultSubnet() *schema.Resource { dsubnet.Create = resourceAwsDefaultSubnetCreate dsubnet.Delete = resourceAwsDefaultSubnetDelete - // vpc_id is a required value for Default Subnets + // availability_zone is a required value for Default Subnets dsubnet.Schema["availability_zone"] = &schema.Schema{ Type: schema.TypeString, Required: true, } + // availability_zone_id is a computed value for Default Subnets + dsubnet.Schema["availability_zone_id"] = &schema.Schema{ + Type: schema.TypeString, + Computed: true, + } // vpc_id is a computed value for Default Subnets dsubnet.Schema["vpc_id"] = &schema.Schema{ Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go index 93d2763d9..ecc0bd87c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go @@ -76,11 +76,7 @@ func resourceAwsDefaultVpcDhcpOptionsCreate(d *schema.ResourceData, meta interfa d.SetId(aws.StringValue(resp.DhcpOptions[0].DhcpOptionsId)) - if err := resourceAwsVpcDhcpOptionsUpdate(d, meta); err != nil { - return err - } - - return resourceAwsVpcDhcpOptionsRead(d, meta) + return resourceAwsVpcDhcpOptionsUpdate(d, meta) } func resourceAwsDefaultVpcDhcpOptionsDelete(d *schema.ResourceData, meta interface{}) error { 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 bfc54c51b..d440d1267 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 @@ -482,7 +482,7 @@ func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta int } log.Printf("[DEBUG] Waiting for Directory Service Directory (%q) to be deleted", d.Id()) - err = waitForDirectoryServiceDirectoryDeletion(dsconn, d.Id(), 60*time.Minute) + err = waitForDirectoryServiceDirectoryDeletion(dsconn, d.Id()) if err != nil { return fmt.Errorf("error waiting for Directory Service (%s) to be deleted: %s", d.Id(), err) } @@ -490,7 +490,7 @@ func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta int return nil } -func waitForDirectoryServiceDirectoryDeletion(conn *directoryservice.DirectoryService, directoryID string, timeout time.Duration) error { +func waitForDirectoryServiceDirectoryDeletion(conn *directoryservice.DirectoryService, directoryID string) error { stateConf := &resource.StateChangeConf{ Pending: []string{ directoryservice.DirectoryStageActive, @@ -516,7 +516,7 @@ func waitForDirectoryServiceDirectoryDeletion(conn *directoryservice.DirectorySe 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: timeout, + Timeout: 60 * time.Minute, } _, err := stateConf.WaitForState() 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 000000000..7211e3bfd --- /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_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go index c8c8cba21..aa33602be 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 f0ce581ff..56fc6f85a 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 855061c9e..87ed7673b 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 a8cede3c7..850acd898 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 46bafff59..b3cfc6963 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_private_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go index cd92f28b6..f5851bd9d 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 bc072fe6d..26d3cb3a1 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 f264de052..c4d7eab40 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 @@ -83,13 +83,22 @@ func resourceAwsDynamoDbTable() *schema.Resource { Optional: true, ForceNew: true, }, + "billing_mode": { + Type: schema.TypeString, + Optional: true, + Default: dynamodb.BillingModeProvisioned, + ValidateFunc: validation.StringInSlice([]string{ + dynamodb.BillingModePayPerRequest, + dynamodb.BillingModeProvisioned, + }, false), + }, "write_capacity": { Type: schema.TypeInt, - Required: true, + Optional: true, }, "read_capacity": { Type: schema.TypeInt, - Required: true, + Optional: true, }, "attribute": { Type: schema.TypeSet, @@ -178,11 +187,11 @@ func resourceAwsDynamoDbTable() *schema.Resource { }, "write_capacity": { Type: schema.TypeInt, - Required: true, + Optional: true, }, "read_capacity": { Type: schema.TypeInt, - Required: true, + Optional: true, }, "hash_key": { Type: schema.TypeString, @@ -279,14 +288,23 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er log.Printf("[DEBUG] Creating DynamoDB table with key schema: %#v", keySchemaMap) req := &dynamodb.CreateTableInput{ - TableName: aws.String(d.Get("name").(string)), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(map[string]interface{}{ - "read_capacity": d.Get("read_capacity"), - "write_capacity": d.Get("write_capacity"), - }), - KeySchema: expandDynamoDbKeySchema(keySchemaMap), + TableName: aws.String(d.Get("name").(string)), + BillingMode: aws.String(d.Get("billing_mode").(string)), + KeySchema: expandDynamoDbKeySchema(keySchemaMap), } + billingMode := d.Get("billing_mode").(string) + capacityMap := map[string]interface{}{ + "write_capacity": d.Get("write_capacity"), + "read_capacity": d.Get("read_capacity"), + } + + if err := validateDynamoDbProvisionedThroughput(capacityMap, billingMode); err != nil { + return err + } + + req.ProvisionedThroughput = expandDynamoDbProvisionedThroughput(capacityMap, billingMode) + if v, ok := d.GetOk("attribute"); ok { aSet := v.(*schema.Set) req.AttributeDefinitions = expandDynamoDbAttributes(aSet.List()) @@ -300,9 +318,14 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er if v, ok := d.GetOk("global_secondary_index"); ok { globalSecondaryIndexes := []*dynamodb.GlobalSecondaryIndex{} gsiSet := v.(*schema.Set) + for _, gsiObject := range gsiSet.List() { gsi := gsiObject.(map[string]interface{}) - gsiObject := expandDynamoDbGlobalSecondaryIndex(gsi) + if err := validateDynamoDbProvisionedThroughput(gsi, billingMode); err != nil { + return fmt.Errorf("Failed to create GSI: %v", err) + } + + gsiObject := expandDynamoDbGlobalSecondaryIndex(gsi, billingMode) globalSecondaryIndexes = append(globalSecondaryIndexes, gsiObject) } req.GlobalSecondaryIndexes = globalSecondaryIndexes @@ -360,16 +383,39 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dynamodbconn + billingMode := d.Get("billing_mode").(string) + if d.HasChange("billing_mode") && !d.IsNewResource() { + req := &dynamodb.UpdateTableInput{ + TableName: aws.String(d.Id()), + BillingMode: aws.String(billingMode), + } + capacityMap := map[string]interface{}{ + "write_capacity": d.Get("write_capacity"), + "read_capacity": d.Get("read_capacity"), + } + + if err := validateDynamoDbProvisionedThroughput(capacityMap, billingMode); err != nil { + return err + } + + _, err := conn.UpdateTable(req) + if err != nil { + return fmt.Errorf("Error updating DynamoDB Table (%s) billing mode: %s", d.Id(), err) + } + if err := waitForDynamoDbTableToBeActive(d.Id(), d.Timeout(schema.TimeoutUpdate), conn); err != nil { + return fmt.Errorf("Error waiting for DynamoDB Table update: %s", err) + } + } // Cannot create or delete index while updating table IOPS // so we update IOPS separately - if (d.HasChange("read_capacity") || d.HasChange("write_capacity")) && !d.IsNewResource() { + if !d.HasChange("billing_mode") && d.Get("billing_mode").(string) == dynamodb.BillingModeProvisioned && (d.HasChange("read_capacity") || d.HasChange("write_capacity")) && !d.IsNewResource() { _, err := conn.UpdateTable(&dynamodb.UpdateTableInput{ TableName: aws.String(d.Id()), ProvisionedThroughput: expandDynamoDbProvisionedThroughput(map[string]interface{}{ "read_capacity": d.Get("read_capacity"), "write_capacity": d.Get("write_capacity"), - }), + }, billingMode), }) if err != nil { return err @@ -407,7 +453,7 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er attributes := d.Get("attribute").(*schema.Set).List() o, n := d.GetChange("global_secondary_index") - ops, err := diffDynamoDbGSI(o.(*schema.Set).List(), n.(*schema.Set).List()) + ops, err := diffDynamoDbGSI(o.(*schema.Set).List(), n.(*schema.Set).List(), billingMode) if err != nil { return fmt.Errorf("Computing difference for global_secondary_index failed: %s", err) } @@ -701,18 +747,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_ebs_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go index 8e6eaba7f..7821ece72 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_volume.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go index 1d37720b6..45dc65a89 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 @@ -91,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 @@ -138,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 fmt.Errorf("Error setting tags for EBS Volume: %s", err) - } - } - return resourceAwsEbsVolumeRead(d, meta) } 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 000000000..46bae8a87 --- /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_transit_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway.go new file mode 100644 index 000000000..13228ab14 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway.go @@ -0,0 +1,249 @@ +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/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsEc2TransitGateway() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2TransitGatewayCreate, + Read: resourceAwsEc2TransitGatewayRead, + Update: resourceAwsEc2TransitGatewayUpdate, + Delete: resourceAwsEc2TransitGatewayDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "amazon_side_asn": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + Default: 64512, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "association_default_route_table_id": { + Type: schema.TypeString, + Computed: true, + }, + "auto_accept_shared_attachments": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.AutoAcceptSharedAttachmentsValueDisable, + ValidateFunc: validation.StringInSlice([]string{ + ec2.AutoAcceptSharedAttachmentsValueDisable, + ec2.AutoAcceptSharedAttachmentsValueEnable, + }, false), + }, + "default_route_table_association": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.DefaultRouteTableAssociationValueEnable, + ValidateFunc: validation.StringInSlice([]string{ + ec2.DefaultRouteTableAssociationValueDisable, + ec2.DefaultRouteTableAssociationValueEnable, + }, false), + }, + "default_route_table_propagation": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.DefaultRouteTablePropagationValueEnable, + ValidateFunc: validation.StringInSlice([]string{ + ec2.DefaultRouteTablePropagationValueDisable, + ec2.DefaultRouteTablePropagationValueEnable, + }, false), + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "dns_support": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.DnsSupportValueEnable, + ValidateFunc: validation.StringInSlice([]string{ + ec2.DnsSupportValueDisable, + ec2.DnsSupportValueEnable, + }, false), + }, + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, + "propagation_default_route_table_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "vpn_ecmp_support": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.VpnEcmpSupportValueEnable, + ValidateFunc: validation.StringInSlice([]string{ + ec2.VpnEcmpSupportValueDisable, + ec2.VpnEcmpSupportValueEnable, + }, false), + }, + }, + } +} + +func resourceAwsEc2TransitGatewayCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.CreateTransitGatewayInput{ + Options: &ec2.TransitGatewayRequestOptions{ + AutoAcceptSharedAttachments: aws.String(d.Get("auto_accept_shared_attachments").(string)), + DefaultRouteTableAssociation: aws.String(d.Get("default_route_table_association").(string)), + DefaultRouteTablePropagation: aws.String(d.Get("default_route_table_propagation").(string)), + DnsSupport: aws.String(d.Get("dns_support").(string)), + VpnEcmpSupport: aws.String(d.Get("vpn_ecmp_support").(string)), + }, + TagSpecifications: expandEc2TransitGatewayTagSpecifications(d.Get("tags").(map[string]interface{})), + } + + if v, ok := d.GetOk("amazon_side_asn"); ok { + input.Options.AmazonSideAsn = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating EC2 Transit Gateway: %s", input) + output, err := conn.CreateTransitGateway(input) + if err != nil { + return fmt.Errorf("error creating EC2 Transit Gateway: %s", err) + } + + d.SetId(aws.StringValue(output.TransitGateway.TransitGatewayId)) + + if err := waitForEc2TransitGatewayCreation(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway (%s) availability: %s", d.Id(), err) + } + + return resourceAwsEc2TransitGatewayRead(d, meta) +} + +func resourceAwsEc2TransitGatewayRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGateway, err := ec2DescribeTransitGateway(conn, d.Id()) + + if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { + log.Printf("[WARN] EC2 Transit Gateway (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway: %s", err) + } + + if transitGateway == nil { + log.Printf("[WARN] EC2 Transit Gateway (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if aws.StringValue(transitGateway.State) == ec2.TransitGatewayStateDeleting || aws.StringValue(transitGateway.State) == ec2.TransitGatewayStateDeleted { + log.Printf("[WARN] EC2 Transit Gateway (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(transitGateway.State)) + d.SetId("") + return nil + } + + if transitGateway.Options == nil { + return fmt.Errorf("error reading EC2 Transit Gateway (%s): missing options", d.Id()) + } + + d.Set("amazon_side_asn", aws.Int64Value(transitGateway.Options.AmazonSideAsn)) + d.Set("arn", transitGateway.TransitGatewayArn) + d.Set("association_default_route_table_id", transitGateway.Options.AssociationDefaultRouteTableId) + d.Set("auto_accept_shared_attachments", transitGateway.Options.AutoAcceptSharedAttachments) + d.Set("default_route_table_association", transitGateway.Options.DefaultRouteTableAssociation) + d.Set("default_route_table_propagation", transitGateway.Options.DefaultRouteTablePropagation) + d.Set("description", transitGateway.Description) + d.Set("dns_support", transitGateway.Options.DnsSupport) + d.Set("owner_id", transitGateway.OwnerId) + d.Set("propagation_default_route_table_id", transitGateway.Options.PropagationDefaultRouteTableId) + + if err := d.Set("tags", tagsToMap(transitGateway.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("vpn_ecmp_support", transitGateway.Options.VpnEcmpSupport) + + return nil +} + +func resourceAwsEc2TransitGatewayUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if err := setTags(conn, d); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway (%s) tags: %s", d.Id(), err) + } + + return nil +} + +func resourceAwsEc2TransitGatewayDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DeleteTransitGatewayInput{ + TransitGatewayId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting EC2 Transit Gateway (%s): %s", d.Id(), input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteTransitGateway(input) + + if isAWSErr(err, "IncorrectState", "has non-deleted Transit Gateway Attachments") { + return resource.RetryableError(err) + } + + if isAWSErr(err, "IncorrectState", "has non-deleted VPN Attachments") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + + if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting EC2 Transit Gateway: %s", err) + } + + if err := waitForEc2TransitGatewayDeletion(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway (%s) deletion: %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go new file mode 100644 index 000000000..020925d5b --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go @@ -0,0 +1,161 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/resource" + + "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 resourceAwsEc2TransitGatewayRoute() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2TransitGatewayRouteCreate, + Read: resourceAwsEc2TransitGatewayRouteRead, + Delete: resourceAwsEc2TransitGatewayRouteDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "destination_cidr_block": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "transit_gateway_attachment_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "transit_gateway_route_table_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + } +} + +func resourceAwsEc2TransitGatewayRouteCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + destination := d.Get("destination_cidr_block").(string) + transitGatewayRouteTableID := d.Get("transit_gateway_route_table_id").(string) + + input := &ec2.CreateTransitGatewayRouteInput{ + DestinationCidrBlock: aws.String(destination), + TransitGatewayAttachmentId: aws.String(d.Get("transit_gateway_attachment_id").(string)), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + log.Printf("[DEBUG] Creating EC2 Transit Gateway Route: %s", input) + _, err := conn.CreateTransitGatewayRoute(input) + if err != nil { + return fmt.Errorf("error creating EC2 Transit Gateway Route: %s", err) + } + + d.SetId(fmt.Sprintf("%s_%s", transitGatewayRouteTableID, destination)) + + return resourceAwsEc2TransitGatewayRouteRead(d, meta) +} + +func resourceAwsEc2TransitGatewayRouteRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayRouteTableID, destination, err := decodeEc2TransitGatewayRouteID(d.Id()) + if err != nil { + return err + } + + // Handle EC2 eventual consistency + var transitGatewayRoute *ec2.TransitGatewayRoute + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + transitGatewayRoute, err = ec2DescribeTransitGatewayRoute(conn, transitGatewayRouteTableID, destination) + + if err != nil { + return resource.NonRetryableError(err) + } + + if d.IsNewResource() && transitGatewayRoute == nil { + return resource.RetryableError(&resource.NotFoundError{}) + } + + return nil + }) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", transitGatewayRouteTableID) + d.SetId("") + return nil + } + + if isResourceNotFoundError(err) { + log.Printf("[WARN] EC2 Transit Gateway Route (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Route: %s", err) + } + + if transitGatewayRoute == nil { + log.Printf("[WARN] EC2 Transit Gateway Route (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + state := aws.StringValue(transitGatewayRoute.State) + if state == ec2.TransitGatewayRouteStateDeleted || state == ec2.TransitGatewayRouteStateDeleting { + log.Printf("[WARN] EC2 Transit Gateway Route (%s) deleted, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("destination_cidr_block", transitGatewayRoute.DestinationCidrBlock) + + d.Set("transit_gateway_attachment_id", "") + if len(transitGatewayRoute.TransitGatewayAttachments) == 0 || transitGatewayRoute.TransitGatewayAttachments[0] != nil { + d.Set("transit_gateway_attachment_id", transitGatewayRoute.TransitGatewayAttachments[0].TransitGatewayAttachmentId) + } + + d.Set("transit_gateway_route_table_id", transitGatewayRouteTableID) + + return nil +} + +func resourceAwsEc2TransitGatewayRouteDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayRouteTableID, destination, err := decodeEc2TransitGatewayRouteID(d.Id()) + if err != nil { + return err + } + + input := &ec2.DeleteTransitGatewayRouteInput{ + DestinationCidrBlock: aws.String(destination), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + log.Printf("[DEBUG] Deleting EC2 Transit Gateway Route (%s): %s", d.Id(), input) + _, err = conn.DeleteTransitGatewayRoute(input) + + if isAWSErr(err, "InvalidRoute.NotFound", "") || isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting EC2 Transit Gateway Route: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table.go new file mode 100644 index 000000000..b08c6e9d6 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table.go @@ -0,0 +1,142 @@ +package aws + +import ( + "fmt" + "log" + + "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 resourceAwsEc2TransitGatewayRouteTable() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2TransitGatewayRouteTableCreate, + Read: resourceAwsEc2TransitGatewayRouteTableRead, + Update: resourceAwsEc2TransitGatewayRouteTableUpdate, + Delete: resourceAwsEc2TransitGatewayRouteTableDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "default_association_route_table": { + Type: schema.TypeBool, + Computed: true, + }, + "default_propagation_route_table": { + Type: schema.TypeBool, + Computed: true, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "transit_gateway_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + } +} + +func resourceAwsEc2TransitGatewayRouteTableCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.CreateTransitGatewayRouteTableInput{ + TransitGatewayId: aws.String(d.Get("transit_gateway_id").(string)), + TagSpecifications: expandEc2TransitGatewayRouteTableTagSpecifications(d.Get("tags").(map[string]interface{})), + } + + log.Printf("[DEBUG] Creating EC2 Transit Gateway Route Table: %s", input) + output, err := conn.CreateTransitGatewayRouteTable(input) + if err != nil { + return fmt.Errorf("error creating EC2 Transit Gateway Route Table: %s", err) + } + + d.SetId(aws.StringValue(output.TransitGatewayRouteTable.TransitGatewayRouteTableId)) + + if err := waitForEc2TransitGatewayRouteTableCreation(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) availability: %s", d.Id(), err) + } + + return resourceAwsEc2TransitGatewayRouteTableRead(d, meta) +} + +func resourceAwsEc2TransitGatewayRouteTableRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayRouteTable, err := ec2DescribeTransitGatewayRouteTable(conn, d.Id()) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Route Table: %s", err) + } + + if transitGatewayRouteTable == nil { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if aws.StringValue(transitGatewayRouteTable.State) == ec2.TransitGatewayRouteTableStateDeleting || aws.StringValue(transitGatewayRouteTable.State) == ec2.TransitGatewayRouteTableStateDeleted { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(transitGatewayRouteTable.State)) + d.SetId("") + return nil + } + + d.Set("default_association_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultAssociationRouteTable)) + d.Set("default_propagation_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultPropagationRouteTable)) + + if err := d.Set("tags", tagsToMap(transitGatewayRouteTable.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("transit_gateway_id", aws.StringValue(transitGatewayRouteTable.TransitGatewayId)) + + return nil +} + +func resourceAwsEc2TransitGatewayRouteTableUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if err := setTags(conn, d); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway Route Table (%s) tags: %s", d.Id(), err) + } + + return nil +} + +func resourceAwsEc2TransitGatewayRouteTableDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DeleteTransitGatewayRouteTableInput{ + TransitGatewayRouteTableId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting EC2 Transit Gateway Route Table (%s): %s", d.Id(), input) + _, err := conn.DeleteTransitGatewayRouteTable(input) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting EC2 Transit Gateway Route Table: %s", err) + } + + if err := waitForEc2TransitGatewayRouteTableDeletion(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) deletion: %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_association.go new file mode 100644 index 000000000..6f5a647db --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_association.go @@ -0,0 +1,141 @@ +package aws + +import ( + "fmt" + "log" + + "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 resourceAwsEc2TransitGatewayRouteTableAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2TransitGatewayRouteTableAssociationCreate, + Read: resourceAwsEc2TransitGatewayRouteTableAssociationRead, + Delete: resourceAwsEc2TransitGatewayRouteTableAssociationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "resource_id": { + Type: schema.TypeString, + Computed: true, + }, + "resource_type": { + Type: schema.TypeString, + Computed: true, + }, + "transit_gateway_attachment_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "transit_gateway_route_table_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + } +} + +func resourceAwsEc2TransitGatewayRouteTableAssociationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayAttachmentID := d.Get("transit_gateway_attachment_id").(string) + transitGatewayRouteTableID := d.Get("transit_gateway_route_table_id").(string) + + input := &ec2.AssociateTransitGatewayRouteTableInput{ + TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + _, err := conn.AssociateTransitGatewayRouteTable(input) + if err != nil { + return fmt.Errorf("error associating EC2 Transit Gateway Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + d.SetId(fmt.Sprintf("%s_%s", transitGatewayRouteTableID, transitGatewayAttachmentID)) + + if err := waitForEc2TransitGatewayRouteTableAssociationCreation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + return resourceAwsEc2TransitGatewayRouteTableAssociationRead(d, meta) +} + +func resourceAwsEc2TransitGatewayRouteTableAssociationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayRouteTableID, transitGatewayAttachmentID, err := decodeEc2TransitGatewayRouteTableAssociationID(d.Id()) + if err != nil { + return err + } + + transitGatewayAssociation, err := ec2DescribeTransitGatewayRouteTableAssociation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", transitGatewayRouteTableID) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Route Table (%s) Association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + if transitGatewayAssociation == nil { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) Association (%s) not found, removing from state", transitGatewayRouteTableID, transitGatewayAttachmentID) + d.SetId("") + return nil + } + + if aws.StringValue(transitGatewayAssociation.State) == ec2.TransitGatewayAssociationStateDisassociating { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) Association (%s) in deleted state (%s), removing from state", transitGatewayRouteTableID, transitGatewayAttachmentID, aws.StringValue(transitGatewayAssociation.State)) + d.SetId("") + return nil + } + + d.Set("resource_id", aws.StringValue(transitGatewayAssociation.ResourceId)) + d.Set("resource_type", aws.StringValue(transitGatewayAssociation.ResourceType)) + d.Set("transit_gateway_attachment_id", aws.StringValue(transitGatewayAssociation.TransitGatewayAttachmentId)) + d.Set("transit_gateway_route_table_id", transitGatewayRouteTableID) + + return nil +} + +func resourceAwsEc2TransitGatewayRouteTableAssociationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayRouteTableID, transitGatewayAttachmentID, err := decodeEc2TransitGatewayRouteTableAssociationID(d.Id()) + if err != nil { + return err + } + + input := &ec2.DisassociateTransitGatewayRouteTableInput{ + TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + log.Printf("[DEBUG] Disassociating EC2 Transit Gateway Route Table (%s) Association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, input) + _, err = conn.DisassociateTransitGatewayRouteTable(input) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error disassociating EC2 Transit Gateway Route Table (%s) Association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + if err := waitForEc2TransitGatewayRouteTableAssociationDeletion(conn, transitGatewayRouteTableID, transitGatewayAttachmentID); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) Association (%s) disassociation: %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_propagation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_propagation.go new file mode 100644 index 000000000..b553db574 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_propagation.go @@ -0,0 +1,127 @@ +package aws + +import ( + "fmt" + "log" + + "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 resourceAwsEc2TransitGatewayRouteTablePropagation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2TransitGatewayRouteTablePropagationCreate, + Read: resourceAwsEc2TransitGatewayRouteTablePropagationRead, + Delete: resourceAwsEc2TransitGatewayRouteTablePropagationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "resource_id": { + Type: schema.TypeString, + Computed: true, + }, + "resource_type": { + Type: schema.TypeString, + Computed: true, + }, + "transit_gateway_attachment_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "transit_gateway_route_table_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + } +} + +func resourceAwsEc2TransitGatewayRouteTablePropagationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayAttachmentID := d.Get("transit_gateway_attachment_id").(string) + transitGatewayRouteTableID := d.Get("transit_gateway_route_table_id").(string) + + input := &ec2.EnableTransitGatewayRouteTablePropagationInput{ + TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + _, err := conn.EnableTransitGatewayRouteTablePropagation(input) + if err != nil { + return fmt.Errorf("error enabling EC2 Transit Gateway Route Table (%s) propagation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + d.SetId(fmt.Sprintf("%s_%s", transitGatewayRouteTableID, transitGatewayAttachmentID)) + + return resourceAwsEc2TransitGatewayRouteTablePropagationRead(d, meta) +} + +func resourceAwsEc2TransitGatewayRouteTablePropagationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayRouteTableID, transitGatewayAttachmentID, err := decodeEc2TransitGatewayRouteTablePropagationID(d.Id()) + if err != nil { + return err + } + + transitGatewayPropagation, err := ec2DescribeTransitGatewayRouteTablePropagation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", transitGatewayRouteTableID) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Route Table (%s) Propagation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + if transitGatewayPropagation == nil { + log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) Propagation (%s) not found, removing from state", transitGatewayRouteTableID, transitGatewayAttachmentID) + d.SetId("") + return nil + } + + d.Set("resource_id", aws.StringValue(transitGatewayPropagation.ResourceId)) + d.Set("resource_type", aws.StringValue(transitGatewayPropagation.ResourceType)) + d.Set("transit_gateway_attachment_id", aws.StringValue(transitGatewayPropagation.TransitGatewayAttachmentId)) + d.Set("transit_gateway_route_table_id", transitGatewayRouteTableID) + + return nil +} + +func resourceAwsEc2TransitGatewayRouteTablePropagationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayRouteTableID, transitGatewayAttachmentID, err := decodeEc2TransitGatewayRouteTablePropagationID(d.Id()) + if err != nil { + return err + } + + input := &ec2.DisableTransitGatewayRouteTablePropagationInput{ + TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), + TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), + } + + log.Printf("[DEBUG] Disabling EC2 Transit Gateway Route Table (%s) Propagation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, input) + _, err = conn.DisableTransitGatewayRouteTablePropagation(input) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error disabling EC2 Transit Gateway Route Table (%s) Propagation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go new file mode 100644 index 000000000..07a05806b --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go @@ -0,0 +1,294 @@ +package aws + +import ( + "fmt" + "log" + + "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 resourceAwsEc2TransitGatewayVpcAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2TransitGatewayVpcAttachmentCreate, + Read: resourceAwsEc2TransitGatewayVpcAttachmentRead, + Update: resourceAwsEc2TransitGatewayVpcAttachmentUpdate, + Delete: resourceAwsEc2TransitGatewayVpcAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "dns_support": { + Type: schema.TypeString, + Optional: true, + Default: ec2.DnsSupportValueEnable, + ValidateFunc: validation.StringInSlice([]string{ + ec2.DnsSupportValueDisable, + ec2.DnsSupportValueEnable, + }, false), + }, + "ipv6_support": { + Type: schema.TypeString, + Optional: true, + Default: ec2.Ipv6SupportValueDisable, + ValidateFunc: validation.StringInSlice([]string{ + ec2.Ipv6SupportValueDisable, + ec2.Ipv6SupportValueEnable, + }, false), + }, + "subnet_ids": { + Type: schema.TypeSet, + Required: true, + MinItems: 1, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "transit_gateway_default_route_table_association": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "transit_gateway_default_route_table_propagation": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "transit_gateway_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "vpc_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "vpc_owner_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsEc2TransitGatewayVpcAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayID := d.Get("transit_gateway_id").(string) + + input := &ec2.CreateTransitGatewayVpcAttachmentInput{ + Options: &ec2.CreateTransitGatewayVpcAttachmentRequestOptions{ + DnsSupport: aws.String(d.Get("dns_support").(string)), + Ipv6Support: aws.String(d.Get("ipv6_support").(string)), + }, + SubnetIds: expandStringSet(d.Get("subnet_ids").(*schema.Set)), + TransitGatewayId: aws.String(transitGatewayID), + TagSpecifications: expandEc2TransitGatewayAttachmentTagSpecifications(d.Get("tags").(map[string]interface{})), + VpcId: aws.String(d.Get("vpc_id").(string)), + } + + log.Printf("[DEBUG] Creating EC2 Transit Gateway VPC Attachment: %s", input) + output, err := conn.CreateTransitGatewayVpcAttachment(input) + if err != nil { + return fmt.Errorf("error creating EC2 Transit Gateway VPC Attachment: %s", err) + } + + d.SetId(aws.StringValue(output.TransitGatewayVpcAttachment.TransitGatewayAttachmentId)) + + if err := waitForEc2TransitGatewayRouteTableAttachmentCreation(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway VPC Attachment (%s) availability: %s", d.Id(), err) + } + + transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) + if err != nil { + return fmt.Errorf("error describing EC2 Transit Gateway (%s): %s", transitGatewayID, err) + } + + if transitGateway.Options == nil { + return fmt.Errorf("error describing EC2 Transit Gateway (%s): missing options", transitGatewayID) + } + + if err := ec2TransitGatewayRouteTableAssociationUpdate(conn, aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId), d.Id(), d.Get("transit_gateway_default_route_table_association").(bool)); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway Attachment (%s) Route Table (%s) association: %s", d.Id(), aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId), err) + } + + if err := ec2TransitGatewayRouteTablePropagationUpdate(conn, aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId), d.Id(), d.Get("transit_gateway_default_route_table_propagation").(bool)); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway Attachment (%s) Route Table (%s) propagation: %s", d.Id(), aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId), err) + } + + return resourceAwsEc2TransitGatewayVpcAttachmentRead(d, meta) +} + +func resourceAwsEc2TransitGatewayVpcAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + transitGatewayVpcAttachment, err := ec2DescribeTransitGatewayVpcAttachment(conn, d.Id()) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + log.Printf("[WARN] EC2 Transit Gateway VPC Attachment (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway VPC Attachment: %s", err) + } + + if transitGatewayVpcAttachment == nil { + log.Printf("[WARN] EC2 Transit Gateway VPC Attachment (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if aws.StringValue(transitGatewayVpcAttachment.State) == ec2.TransitGatewayAttachmentStateDeleting || aws.StringValue(transitGatewayVpcAttachment.State) == ec2.TransitGatewayAttachmentStateDeleted { + log.Printf("[WARN] EC2 Transit Gateway VPC Attachment (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(transitGatewayVpcAttachment.State)) + d.SetId("") + return nil + } + + transitGatewayID := aws.StringValue(transitGatewayVpcAttachment.TransitGatewayId) + transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) + if err != nil { + return fmt.Errorf("error describing EC2 Transit Gateway (%s): %s", transitGatewayID, err) + } + + if transitGateway.Options == nil { + return fmt.Errorf("error describing EC2 Transit Gateway (%s): missing options", transitGatewayID) + } + + transitGatewayAssociationDefaultRouteTableID := aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId) + transitGatewayDefaultRouteTableAssociation, err := ec2DescribeTransitGatewayRouteTableAssociation(conn, transitGatewayAssociationDefaultRouteTableID, d.Id()) + if err != nil { + return fmt.Errorf("error determining EC2 Transit Gateway Attachment (%s) association to Route Table (%s): %s", d.Id(), transitGatewayAssociationDefaultRouteTableID, err) + } + + transitGatewayPropagationDefaultRouteTableID := aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId) + transitGatewayDefaultRouteTablePropagation, err := ec2DescribeTransitGatewayRouteTablePropagation(conn, transitGatewayPropagationDefaultRouteTableID, d.Id()) + if err != nil { + return fmt.Errorf("error determining EC2 Transit Gateway Attachment (%s) propagation to Route Table (%s): %s", d.Id(), transitGatewayPropagationDefaultRouteTableID, err) + } + + if transitGatewayVpcAttachment.Options == nil { + return fmt.Errorf("error reading EC2 Transit Gateway VPC Attachment (%s): missing options", d.Id()) + } + + d.Set("dns_support", transitGatewayVpcAttachment.Options.DnsSupport) + d.Set("ipv6_support", transitGatewayVpcAttachment.Options.Ipv6Support) + + if err := d.Set("subnet_ids", aws.StringValueSlice(transitGatewayVpcAttachment.SubnetIds)); err != nil { + return fmt.Errorf("error setting subnet_ids: %s", err) + } + + if err := d.Set("tags", tagsToMap(transitGatewayVpcAttachment.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("transit_gateway_default_route_table_association", (transitGatewayDefaultRouteTableAssociation != nil)) + d.Set("transit_gateway_default_route_table_propagation", (transitGatewayDefaultRouteTablePropagation != nil)) + d.Set("transit_gateway_id", aws.StringValue(transitGatewayVpcAttachment.TransitGatewayId)) + d.Set("vpc_id", aws.StringValue(transitGatewayVpcAttachment.VpcId)) + d.Set("vpc_owner_id", aws.StringValue(transitGatewayVpcAttachment.VpcOwnerId)) + + return nil +} + +func resourceAwsEc2TransitGatewayVpcAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if d.HasChange("dns_support") || d.HasChange("ipv6_support") || d.HasChange("subnet_ids") { + input := &ec2.ModifyTransitGatewayVpcAttachmentInput{ + Options: &ec2.ModifyTransitGatewayVpcAttachmentRequestOptions{ + DnsSupport: aws.String(d.Get("dns_support").(string)), + Ipv6Support: aws.String(d.Get("ipv6_support").(string)), + }, + TransitGatewayAttachmentId: aws.String(d.Id()), + } + + oldRaw, newRaw := d.GetChange("subnet_ids") + oldSet := oldRaw.(*schema.Set) + newSet := newRaw.(*schema.Set) + + if added := newSet.Difference(oldSet); added.Len() > 0 { + input.AddSubnetIds = expandStringSet(added) + } + + if removed := oldSet.Difference(newSet); removed.Len() > 0 { + input.RemoveSubnetIds = expandStringSet(removed) + } + + if _, err := conn.ModifyTransitGatewayVpcAttachment(input); err != nil { + return fmt.Errorf("error modifying EC2 Transit Gateway VPC Attachment (%s): %s", d.Id(), err) + } + + if err := waitForEc2TransitGatewayRouteTableAttachmentUpdate(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway VPC Attachment (%s) update: %s", d.Id(), err) + } + } + + if d.HasChange("transit_gateway_default_route_table_association") || d.HasChange("transit_gateway_default_route_table_propagation") { + transitGatewayID := d.Get("transit_gateway_id").(string) + + transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) + if err != nil { + return fmt.Errorf("error describing EC2 Transit Gateway (%s): %s", transitGatewayID, err) + } + + if transitGateway.Options == nil { + return fmt.Errorf("error describing EC2 Transit Gateway (%s): missing options", transitGatewayID) + } + + if d.HasChange("transit_gateway_default_route_table_association") { + if err := ec2TransitGatewayRouteTableAssociationUpdate(conn, aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId), d.Id(), d.Get("transit_gateway_default_route_table_association").(bool)); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway Attachment (%s) Route Table (%s) association: %s", d.Id(), aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId), err) + } + } + + if d.HasChange("transit_gateway_default_route_table_propagation") { + if err := ec2TransitGatewayRouteTablePropagationUpdate(conn, aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId), d.Id(), d.Get("transit_gateway_default_route_table_propagation").(bool)); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway Attachment (%s) Route Table (%s) propagation: %s", d.Id(), aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId), err) + } + } + } + + if d.HasChange("tags") { + if err := setTags(conn, d); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway VPC Attachment (%s) tags: %s", d.Id(), err) + } + } + + return nil +} + +func resourceAwsEc2TransitGatewayVpcAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DeleteTransitGatewayVpcAttachmentInput{ + TransitGatewayAttachmentId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting EC2 Transit Gateway VPC Attachment (%s): %s", d.Id(), input) + _, err := conn.DeleteTransitGatewayVpcAttachment(input) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting EC2 Transit Gateway VPC Attachment: %s", err) + } + + if err := waitForEc2TransitGatewayRouteTableAttachmentDeletion(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway VPC Attachment (%s) deletion: %s", d.Id(), err) + } + + return nil +} 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 5b25b9e6a..032318ed2 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)}, - }) - if err != nil { - return err + input := &ecs.DescribeClustersInput{ + Clusters: []*string{aws.String(d.Id())}, + Include: []*string{aws.String(ecs.ClusterFieldTags)}, } - log.Printf("[DEBUG] Received ECS clusters: %s", out.Clusters) - 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 + 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{}) + } - d.SetId(*c.ClusterArn) - d.Set("arn", c.ClusterArn) - d.Set("name", c.ClusterName) - return nil + 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 fmt.Errorf("error reading ECS Cluster (%s): %s", d.Id(), err) + } + + var cluster *ecs.Cluster + for _, c := range out.Clusters { + 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 + } + + 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 83715e1b4..bbe88552b 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, @@ -90,12 +93,39 @@ func resourceAwsEcsService() *schema.Resource { Computed: true, }, + "deployment_controller": { + 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{ + "type": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + Default: ecs.DeploymentControllerTypeEcs, + ValidateFunc: validation.StringInSlice([]string{ + ecs.DeploymentControllerTypeCodeDeploy, + ecs.DeploymentControllerTypeEcs, + }, false), + }, + }, + }, + }, + "deployment_maximum_percent": { Type: schema.TypeInt, 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 +137,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 @@ -271,6 +301,23 @@ func resourceAwsEcsService() *schema.Resource { }, }, + "propagate_tags": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "NONE" && new == "" { + return true + } + return false + }, + ValidateFunc: validation.StringInSlice([]string{ + ecs.PropagateTagsService, + ecs.PropagateTagsTaskDefinition, + "", + }, false), + }, + "service_registries": { Type: schema.TypeSet, Optional: true, @@ -300,6 +347,7 @@ func resourceAwsEcsService() *schema.Resource { }, }, }, + "tags": tagsSchema(), }, } } @@ -327,15 +375,29 @@ 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()), + DeploymentController: expandEcsDeploymentController(d.Get("deployment_controller").([]interface{})), + 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,12 +412,8 @@ 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 + if v, ok := d.GetOk("propagate_tags"); ok { + input.PropagateTags = aws.String(v.(string)) } loadBalancers := expandEcsLoadBalancers(d.Get("load_balancer").(*schema.Set).List()) @@ -468,8 +526,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 @@ -535,6 +594,8 @@ 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) + d.Set("propagate_tags", service.PropagateTags) // Save cluster in the same format if strings.HasPrefix(d.Get("cluster").(string), "arn:"+meta.(*AWSClient).partition+":ecs:") { @@ -559,6 +620,10 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { d.Set("deployment_minimum_healthy_percent", service.DeploymentConfiguration.MinimumHealthyPercent) } + if err := d.Set("deployment_controller", flattenEcsDeploymentController(service.DeploymentController)); err != nil { + return fmt.Errorf("Error setting deployment_controller for (%s): %s", d.Id(), err) + } + if service.LoadBalancers != nil { d.Set("load_balancer", flattenEcsLoadBalancers(service.LoadBalancers)) } @@ -584,9 +649,41 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { 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 } +func expandEcsDeploymentController(l []interface{}) *ecs.DeploymentController { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + deploymentController := &ecs.DeploymentController{ + Type: aws.String(m["type"].(string)), + } + + return deploymentController +} + +func flattenEcsDeploymentController(deploymentController *ecs.DeploymentController) []interface{} { + m := map[string]interface{}{ + "type": ecs.DeploymentControllerTypeEcs, + } + + if deploymentController == nil { + return []interface{}{m} + } + + m["type"] = aws.StringValue(deploymentController.Type) + + return []interface{}{m} +} + func flattenEcsNetworkConfiguration(nc *ecs.NetworkConfiguration) []interface{} { if nc == nil { return nil @@ -759,57 +856,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 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)) + + 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 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("health_check_grace_period_seconds") { + updateService = true + input.HealthCheckGracePeriodSeconds = aws.Int64(int64(d.Get("health_check_grace_period_seconds").(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) @@ -931,15 +1080,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 e815f86b8..d07f6dafe 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 @@ -4,8 +4,10 @@ import ( "bytes" "fmt" "log" + "strings" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/ecs" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" @@ -17,7 +19,27 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { return &schema.Resource{ Create: resourceAwsEcsTaskDefinitionCreate, Read: resourceAwsEcsTaskDefinitionRead, + Update: resourceAwsEcsTaskDefinitionUpdate, Delete: resourceAwsEcsTaskDefinitionDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + d.Set("arn", d.Id()) + + idErr := fmt.Errorf("Expected ID in format of arn:PARTITION:ecs:REGION:ACCOUNTID:task-definition/FAMILY:REVISION and provided: %s", d.Id()) + resARN, err := arn.Parse(d.Id()) + if err != nil { + return nil, idErr + } + familyRevision := strings.TrimPrefix(resARN.Resource, "task-definition/") + familyRevisionParts := strings.Split(familyRevision, ":") + if len(familyRevisionParts) != 2 { + return nil, idErr + } + d.SetId(familyRevisionParts[0]) + + return []*schema.ResourceData{d}, nil + }, + }, SchemaVersion: 1, MigrateState: resourceAwsEcsTaskDefinitionMigrateState, @@ -56,7 +78,7 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { networkMode, ok := d.GetOk("network_mode") isAWSVPC := ok && networkMode.(string) == ecs.NetworkModeAwsvpc - equal, _ := ecsContainerDefinitionsAreEquivalent(old, new, isAWSVPC) + equal, _ := EcsContainerDefinitionsAreEquivalent(old, new, isAWSVPC) return equal }, ValidateFunc: validateAwsEcsTaskDefinitionContainerDefinitions, @@ -186,6 +208,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(), }, } } @@ -213,6 +258,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)) } @@ -233,6 +283,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 { @@ -286,6 +344,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 @@ -321,6 +380,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) } @@ -350,6 +413,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 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 2caf27e1c..4e06fe6e5 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,6 +27,10 @@ func resourceAwsEfsFileSystem() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "creation_token": { Type: schema.TypeString, Optional: true, @@ -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 fe1d87bf1..ee1d8e0cb 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 4954acbd6..bb4cd863a 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,7 +6,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/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -40,18 +39,6 @@ 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 fmt.Errorf("%s", err) } @@ -59,50 +46,35 @@ func resourceAwsEgressOnlyInternetGatewayCreate(d *schema.ResourceData, meta int 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 16833166d..c3f8a1d58 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_eks_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go index f2d111889..8183f0020 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -16,6 +17,7 @@ func resourceAwsEksCluster() *schema.Resource { return &schema.Resource{ Create: resourceAwsEksClusterCreate, Read: resourceAwsEksClusterRead, + Update: resourceAwsEksClusterUpdate, Delete: resourceAwsEksClusterDelete, Importer: &schema.ResourceImporter{ @@ -24,6 +26,7 @@ func resourceAwsEksCluster() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(15 * time.Minute), + Update: schema.DefaultTimeout(60 * time.Minute), Delete: schema.DefaultTimeout(15 * time.Minute), }, @@ -73,7 +76,6 @@ func resourceAwsEksCluster() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ForceNew: true, }, "vpc_config": { Type: schema.TypeList, @@ -210,6 +212,37 @@ func resourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error { return nil } +func resourceAwsEksClusterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).eksconn + + if d.HasChange("version") { + input := &eks.UpdateClusterVersionInput{ + Name: aws.String(d.Id()), + Version: aws.String(d.Get("version").(string)), + } + + log.Printf("[DEBUG] Updating EKS Cluster (%s) version: %s", d.Id(), input) + output, err := conn.UpdateClusterVersion(input) + + if err != nil { + return fmt.Errorf("error updating EKS Cluster (%s) version: %s", d.Id(), err) + } + + if output == nil || output.Update == nil || output.Update.Id == nil { + return fmt.Errorf("error determining EKS Cluster (%s) version update ID: empty response", d.Id()) + } + + updateID := aws.StringValue(output.Update.Id) + + err = waitForUpdateEksCluster(conn, d.Id(), updateID, d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for EKS Cluster (%s) update (%s): %s", d.Id(), updateID, err) + } + } + + return resourceAwsEksClusterRead(d, meta) +} + func resourceAwsEksClusterDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).eksconn @@ -303,6 +336,27 @@ func refreshEksClusterStatus(conn *eks.EKS, clusterName string) resource.StateRe } } +func refreshEksUpdateStatus(conn *eks.EKS, clusterName, updateID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &eks.DescribeUpdateInput{ + Name: aws.String(clusterName), + UpdateId: aws.String(updateID), + } + + output, err := conn.DescribeUpdate(input) + + if err != nil { + return nil, "", err + } + + if output == nil || output.Update == nil { + return nil, "", fmt.Errorf("EKS Cluster (%s) update (%s) missing", clusterName, updateID) + } + + return output.Update, aws.StringValue(output.Update.Status), nil + } +} + func waitForDeleteEksCluster(conn *eks.EKS, clusterName string, timeout time.Duration) error { stateConf := resource.StateChangeConf{ Pending: []string{ @@ -329,3 +383,34 @@ func waitForDeleteEksCluster(conn *eks.EKS, clusterName string, timeout time.Dur } return err } + +func waitForUpdateEksCluster(conn *eks.EKS, clusterName, updateID string, timeout time.Duration) error { + stateConf := resource.StateChangeConf{ + Pending: []string{eks.UpdateStatusInProgress}, + Target: []string{ + eks.UpdateStatusCancelled, + eks.UpdateStatusFailed, + eks.UpdateStatusSuccessful, + }, + Timeout: timeout, + Refresh: refreshEksUpdateStatus(conn, clusterName, updateID), + } + updateRaw, err := stateConf.WaitForState() + + if err != nil { + return err + } + + update := updateRaw.(*eks.Update) + + if aws.StringValue(update.Status) == eks.UpdateStatusSuccessful { + return nil + } + + var detailedErrors []string + for i, updateError := range update.Errors { + detailedErrors = append(detailedErrors, fmt.Sprintf("Error %d: Code: %s / Message: %s", i+1, aws.StringValue(updateError.ErrorCode), aws.StringValue(updateError.ErrorMessage))) + } + + return fmt.Errorf("EKS Cluster (%s) update (%s) status (%s) not successful: Errors:\n%s", clusterName, updateID, aws.StringValue(update.Status), strings.Join(detailedErrors, "\n")) +} 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 1d290c925..d4954d29a 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": { @@ -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 e74b5f429..cea85f33c 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 0c31741fe..5986e487c 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 @@ -576,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 +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) 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 3b7b2f4ca..e8b57cf6b 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 @@ -188,6 +188,101 @@ func resourceAwsElasticacheParameterGroupUpdate(d *schema.ResourceData, meta int } return nil }) + + // When attempting to reset the reserved-memory parameter, the API + // can return the below 500 error, which causes the AWS Go SDK to + // automatically retry and hence timeout resource.Retry(): + // InternalFailure: An internal error has occurred. Please try your query again at a later time. + // Instead of hardcoding the reserved-memory parameter removal + // above, which may become out of date, here we add logic to + // workaround this API behavior + + if isResourceTimeoutError(err) { + for i, paramToModify := range paramsToModify { + if aws.StringValue(paramToModify.ParameterName) != "reserved-memory" { + continue + } + + // Always reset the top level error and remove the reset for reserved-memory + err = nil + paramsToModify = append(paramsToModify[:i], paramsToModify[i+1:]...) + + // If we are only trying to remove reserved-memory and not perform + // an update to reserved-memory or reserved-memory-percentage, we + // can attempt to workaround the API issue by switching it to + // reserved-memory-percentage first then reset that temporary parameter. + + tryReservedMemoryPercentageWorkaround := true + + allConfiguredParameters, err := expandElastiCacheParameters(d.Get("parameter").(*schema.Set).List()) + if err != nil { + return fmt.Errorf("error expanding parameter configuration: %s", err) + } + + for _, configuredParameter := range allConfiguredParameters { + if aws.StringValue(configuredParameter.ParameterName) == "reserved-memory" || aws.StringValue(configuredParameter.ParameterName) == "reserved-memory-percentage" { + tryReservedMemoryPercentageWorkaround = false + break + } + } + + if !tryReservedMemoryPercentageWorkaround { + break + } + + // The reserved-memory-percentage parameter does not exist in redis2.6 and redis2.8 + family := d.Get("family").(string) + if family == "redis2.6" || family == "redis2.8" { + log.Printf("[WARN] Cannot reset Elasticache Parameter Group (%s) reserved-memory parameter with %s family", d.Id(), family) + break + } + + modifyInput := &elasticache.ModifyCacheParameterGroupInput{ + CacheParameterGroupName: aws.String(d.Get("name").(string)), + ParameterNameValues: []*elasticache.ParameterNameValue{ + { + ParameterName: aws.String("reserved-memory-percentage"), + ParameterValue: aws.String("0"), + }, + }, + } + _, err = conn.ModifyCacheParameterGroup(modifyInput) + + if err != nil { + log.Printf("[WARN] Error attempting reserved-memory workaround to switch to reserved-memory-percentage: %s", err) + break + } + + resetInput := &elasticache.ResetCacheParameterGroupInput{ + CacheParameterGroupName: aws.String(d.Get("name").(string)), + ParameterNameValues: []*elasticache.ParameterNameValue{ + { + ParameterName: aws.String("reserved-memory-percentage"), + ParameterValue: aws.String("0"), + }, + }, + } + + _, err = conn.ResetCacheParameterGroup(resetInput) + + if err != nil { + log.Printf("[WARN] Error attempting reserved-memory workaround to reset reserved-memory-percentage: %s", err) + } + + break + } + + // Retry any remaining parameter resets with reserved-memory potentially removed + if len(paramsToModify) > 0 { + resetOpts = elasticache.ResetCacheParameterGroupInput{ + CacheParameterGroupName: aws.String(d.Get("name").(string)), + ParameterNameValues: paramsToModify, + } + // Reset top level error with potentially any new errors + _, err = conn.ResetCacheParameterGroup(&resetOpts) + } + } + if err != nil { return fmt.Errorf("Error resetting Cache Parameter Group: %s", err) } 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 f269f86dd..5a127aafd 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 @@ -350,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, @@ -767,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) } @@ -775,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), @@ -822,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), } @@ -851,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, } @@ -885,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 0daf561f4..000000000 --- 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 8f4864304..06502feea 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 @@ -73,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": { @@ -136,6 +137,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource { Type: schema.TypeList, Optional: true, Computed: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "dedicated_master_count": { @@ -173,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 @@ -352,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") } @@ -377,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") } @@ -398,9 +397,7 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface 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") } @@ -668,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) } @@ -678,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) } @@ -691,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{ 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 0c614e914..366b2ad7e 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 @@ -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) @@ -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,7 +771,7 @@ 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("Error finding core group") } @@ -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_flow_log.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go index e67b5b418..ae0dd9dac 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) 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 815b899d7..3d51b1154 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 000000000..9cdfddbbc --- /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_lock.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go new file mode 100644 index 000000000..c181510cb --- /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 d75035505..37f39462a 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, @@ -153,6 +165,10 @@ func resourceAwsGlueCrawler() *schema.Resource { }, ValidateFunc: validation.ValidateJsonString, }, + "security_configuration": { + Type: schema.TypeString, + Optional: true, + }, }, } } @@ -228,6 +244,10 @@ func createCrawlerInput(crawlerName string, d *schema.ResourceData) (*glue.Creat crawlerInput.Configuration = aws.String(configuration) } + if securityConfiguration, ok := d.GetOk("security_configuration"); ok { + crawlerInput.CrawlerSecurityConfiguration = aws.String(securityConfiguration.(string)) + } + return crawlerInput, nil } @@ -400,6 +420,7 @@ func resourceAwsGlueCrawlerRead(d *schema.ResourceData, meta interface{}) error d.Set("role", crawlerOutput.Crawler.Role) d.Set("configuration", crawlerOutput.Crawler.Configuration) d.Set("description", crawlerOutput.Crawler.Description) + d.Set("security_configuration", crawlerOutput.Crawler.CrawlerSecurityConfiguration) d.Set("schedule", "") if crawlerOutput.Crawler.Schedule != nil { d.Set("schedule", crawlerOutput.Crawler.Schedule.ScheduleExpression) 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 5fd1df863..3a296c393 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 000000000..aa152ec6c --- /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_iam_group_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go index 26e620bac..6e5ca3f44 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 @@ -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 resourceAwsIamGroupPolicyAttachment() *schema.Resource { Create: resourceAwsIamGroupPolicyAttachmentCreate, Read: resourceAwsIamGroupPolicyAttachmentRead, Delete: resourceAwsIamGroupPolicyAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsIamGroupPolicyAttachmentImport, + }, Schema: map[string]*schema.Schema{ "group": { @@ -101,6 +105,19 @@ func resourceAwsIamGroupPolicyAttachmentDelete(d *schema.ResourceData, meta inte return nil } +func resourceAwsIamGroupPolicyAttachmentImport(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()) + } + groupName := idParts[0] + policyARN := idParts[1] + d.Set("group", groupName) + d.Set("policy_arn", policyARN) + d.SetId(fmt.Sprintf("%s-%s", groupName, policyARN)) + return []*schema.ResourceData{d}, nil +} + func attachPolicyToGroup(conn *iam.IAM, group string, arn string) error { _, err := conn.AttachGroupPolicy(&iam.AttachGroupPolicyInput{ GroupName: aws.String(group), 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 9e432f3b5..5e1c92273 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 @@ -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 777eb3d97..08867eee1 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 @@ -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 451e9211b..5ca6096f4 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_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go index 7501bb0b5..c3a622a92 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 @@ -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,73 +243,25 @@ 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 + } + + err = deleteAwsIamUserLoginProfile(iamconn, d.Id()) + if err != nil { + return err } } @@ -300,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_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go index 45bf9b4fe..ec28e0472 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 @@ -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 resourceAwsIamUserPolicyAttachment() *schema.Resource { Create: resourceAwsIamUserPolicyAttachmentCreate, Read: resourceAwsIamUserPolicyAttachmentRead, Delete: resourceAwsIamUserPolicyAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsIamUserPolicyAttachmentImport, + }, Schema: map[string]*schema.Schema{ "user": { @@ -100,6 +104,22 @@ func resourceAwsIamUserPolicyAttachmentDelete(d *schema.ResourceData, meta inter return nil } +func resourceAwsIamUserPolicyAttachmentImport(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()) + } + + userName := idParts[0] + policyARN := idParts[1] + + d.Set("user", userName) + d.Set("policy_arn", policyARN) + d.SetId(fmt.Sprintf("%s-%s", userName, policyARN)) + + return []*schema.ResourceData{d}, nil +} + func attachPolicyToUser(conn *iam.IAM, user string, arn string) error { _, err := conn.AttachUserPolicy(&iam.AttachUserPolicyInput{ UserName: aws.String(user), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go index b16884ff9..241c3040f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.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" @@ -18,6 +19,9 @@ func resourceAwsIamUserSshKey() *schema.Resource { Read: resourceAwsIamUserSshKeyRead, Update: resourceAwsIamUserSshKeyUpdate, Delete: resourceAwsIamUserSshKeyDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsIamUserSshKeyImport, + }, Schema: map[string]*schema.Schema{ "ssh_public_key_id": { @@ -36,11 +40,20 @@ func resourceAwsIamUserSshKey() *schema.Resource { "public_key": { Type: schema.TypeString, Required: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if d.Get("encoding").(string) == "SSH" { + old = cleanSshKey(old) + new = cleanSshKey(new) + } + return strings.Trim(old, "\n") == strings.Trim(new, "\n") + }, }, "encoding": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ iam.EncodingTypeSsh, iam.EncodingTypePem, @@ -80,10 +93,11 @@ func resourceAwsIamUserSshKeyCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsIamUserSshKeyRead(d *schema.ResourceData, meta interface{}) error { iamconn := meta.(*AWSClient).iamconn username := d.Get("username").(string) + encoding := d.Get("encoding").(string) request := &iam.GetSSHPublicKeyInput{ UserName: aws.String(username), SSHPublicKeyId: aws.String(d.Id()), - Encoding: aws.String(d.Get("encoding").(string)), + Encoding: aws.String(encoding), } getResp, err := iamconn.GetSSHPublicKey(request) @@ -96,9 +110,15 @@ func resourceAwsIamUserSshKeyRead(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("Error reading IAM User SSH Key %s: %s", d.Id(), err) } + publicKey := *getResp.SSHPublicKey.SSHPublicKeyBody + if encoding == "SSH" { + publicKey = cleanSshKey(publicKey) + } + d.Set("fingerprint", getResp.SSHPublicKey.Fingerprint) d.Set("status", getResp.SSHPublicKey.Status) d.Set("ssh_public_key_id", getResp.SSHPublicKey.SSHPublicKeyId) + d.Set("public_key", publicKey) return nil } @@ -140,3 +160,32 @@ func resourceAwsIamUserSshKeyDelete(d *schema.ResourceData, meta interface{}) er } return nil } + +func resourceAwsIamUserSshKeyImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.SplitN(d.Id(), ":", 3) + + if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { + return nil, fmt.Errorf("unexpected format of ID (%q), UserName:SSHPublicKeyId:Encoding", d.Id()) + } + + username := idParts[0] + sshPublicKeyId := idParts[1] + encoding := idParts[2] + + d.Set("username", username) + d.Set("ssh_public_key_id", sshPublicKeyId) + d.Set("encoding", encoding) + d.SetId(sshPublicKeyId) + + return []*schema.ResourceData{d}, nil +} + +func cleanSshKey(key string) string { + // Remove comments from SSH Keys + // Comments are anything after "ssh-rsa XXXX" where XXXX is the key. + parts := strings.Split(key, " ") + if len(parts) > 2 { + parts = parts[0:2] + } + return strings.Join(parts, " ") +} 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 e8e44f4d6..1076494d3 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 @@ -287,7 +287,12 @@ func resourceAwsInstance() *schema.Resource { Computed: true, ForceNew: true, }, - + "host_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, "cpu_core_count": { Type: schema.TypeInt, Optional: true, @@ -708,6 +713,9 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { if instance.Placement.Tenancy != nil { d.Set("tenancy", instance.Placement.Tenancy) } + if instance.Placement.HostId != nil { + d.Set("host_id", instance.Placement.HostId) + } if instance.CpuOptions != nil { d.Set("cpu_core_count", instance.CpuOptions.CoreCount) @@ -1821,6 +1829,9 @@ func buildAwsInstanceOpts( if v := d.Get("tenancy").(string); v != "" { opts.Placement.Tenancy = aws.String(v) } + if v := d.Get("host_id").(string); v != "" { + opts.Placement.HostId = aws.String(v) + } if v := d.Get("cpu_core_count").(int); v > 0 { tc := d.Get("cpu_threads_per_core").(int) 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 7f87e9204..41b93b964 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 @@ -28,6 +28,10 @@ func resourceAwsInternetGateway() *schema.Resource { Optional: true, }, "tags": tagsSchema(), + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -70,7 +74,12 @@ func resourceAwsInternetGatewayCreate(d *schema.ResourceData, meta interface{}) } // Attach the new gateway to the correct vpc - return resourceAwsInternetGatewayAttach(d, meta) + err = resourceAwsInternetGatewayAttach(d, meta) + if err != nil { + return fmt.Errorf("error attaching EC2 Internet Gateway (%s): %s", d.Id(), err) + } + + return resourceAwsInternetGatewayRead(d, meta) } func resourceAwsInternetGatewayRead(d *schema.ResourceData, meta interface{}) error { @@ -95,6 +104,7 @@ func resourceAwsInternetGatewayRead(d *schema.ResourceData, meta interface{}) er } d.Set("tags", tagsToMap(ig.Tags)) + d.Set("owner_id", ig.OwnerId) return nil } @@ -120,7 +130,7 @@ func resourceAwsInternetGatewayUpdate(d *schema.ResourceData, meta interface{}) d.SetPartial("tags") - return nil + return resourceAwsInternetGatewayRead(d, meta) } func resourceAwsInternetGatewayDelete(d *schema.ResourceData, meta interface{}) error { 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 000000000..eba80e6fe --- /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 000000000..4cc9e9395 --- /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 36500a6d4..a8e50044e 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 @@ -359,16 +359,19 @@ func createTopicRulePayload(d *schema.ResourceData) *iot.TopicRulePayload { // Add Cloudwatch Metric actions for _, a := range cloudwatchMetricActions { raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ + act := &iot.Action{ CloudwatchMetric: &iot.CloudwatchMetricAction{ MetricName: aws.String(raw["metric_name"].(string)), MetricNamespace: aws.String(raw["metric_namespace"].(string)), MetricUnit: aws.String(raw["metric_unit"].(string)), MetricValue: aws.String(raw["metric_value"].(string)), RoleArn: aws.String(raw["role_arn"].(string)), - MetricTimestamp: aws.String(raw["metric_timestamp"].(string)), }, } + if v, ok := raw["metric_timestamp"].(string); ok && v != "" { + act.CloudwatchMetric.MetricTimestamp = aws.String(v) + } + actions[i] = act i++ } 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 000000000..2aaaf3556 --- /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 2f3c34f9b..e7a356168 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) { @@ -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_kms_grant.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go index fe434f43d..53054d961 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 @@ -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_lambda_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go index fdd38fb83..62f36fd69 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go @@ -40,6 +40,10 @@ func resourceAwsLambdaAlias() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "invoke_arn": { + Type: schema.TypeString, + Computed: true, + }, "routing_config": { Type: schema.TypeList, Optional: true, @@ -114,6 +118,9 @@ func resourceAwsLambdaAliasRead(d *schema.ResourceData, meta interface{}) error d.Set("name", aliasConfiguration.Name) d.Set("arn", aliasConfiguration.AliasArn) + invokeArn := lambdaFunctionInvokeArn(*aliasConfiguration.AliasArn, meta) + d.Set("invoke_arn", invokeArn) + if err := d.Set("routing_config", flattenLambdaAliasRoutingConfiguration(aliasConfiguration.RoutingConfig)); err != nil { return fmt.Errorf("error setting routing_config: %s", err) } 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 4012b5f1e..8cc414923 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 f98de7260..674836761 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 @@ -10,7 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/lambda" - "github.com/mitchellh/go-homedir" + homedir "github.com/mitchellh/go-homedir" "errors" @@ -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) { @@ -111,8 +114,11 @@ func resourceAwsLambdaFunction() *schema.Resource { lambda.RuntimeNodejs43Edge, lambda.RuntimeNodejs610, lambda.RuntimeNodejs810, + lambda.RuntimeProvided, lambda.RuntimePython27, lambda.RuntimePython36, + lambda.RuntimePython37, + lambda.RuntimeRuby25, }, false), }, "timeout": { @@ -392,11 +398,11 @@ func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) e 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) @@ -563,13 +569,7 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err d.Set("qualified_arn", lastQualifiedArn) } - invokeArn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "apigateway", - Region: meta.(*AWSClient).region, - AccountID: "lambda", - Resource: fmt.Sprintf("path/2015-03-31/functions/%s/invocations", *function.FunctionArn), - }.String() + invokeArn := lambdaFunctionInvokeArn(*function.FunctionArn, meta) d.Set("invoke_arn", invokeArn) return nil @@ -881,3 +881,13 @@ func readEnvironmentVariables(ev map[string]interface{}) map[string]string { return variables } + +func lambdaFunctionInvokeArn(functionArn string, meta interface{}) string { + return arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "apigateway", + Region: meta.(*AWSClient).region, + AccountID: "lambda", + Resource: fmt.Sprintf("path/2015-03-31/functions/%s/invocations", functionArn), + }.String() +} 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 11308e53b..76bbd3324 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 @@ -301,6 +301,13 @@ func resourceAwsLambdaPermissionDelete(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Removing Lambda permission: %s", input) _, err := conn.RemovePermission(&input) if err != nil { + // Missing whole policy or Lambda function (API error) + if awsErr, ok := err.(awserr.Error); ok { + if awsErr.Code() == "ResourceNotFoundException" { + log.Printf("[WARN] No Lambda Permission Policy found: %v", input) + return nil + } + } return err } 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 e88cf343b..4a118269f 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, @@ -463,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 } @@ -574,6 +605,10 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err return err } + 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 @@ -615,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 } @@ -706,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 { @@ -869,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)), } @@ -933,6 +989,14 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.Req opts.BlockDeviceMappings = blockDeviceMappings } + 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{}) @@ -1174,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 cd7e8a9a0..27ddee3f7 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,7 @@ import ( "fmt" "log" "regexp" + "sort" "strconv" "strings" "time" @@ -550,9 +551,11 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { d.Set("certificate_arn", listener.Certificates[0].CertificateArn) } - sortedActions := sortActionsBasedonTypeinTFFile("default_action", listener.DefaultActions, d) - defaultActions := make([]interface{}, len(sortedActions)) - for i, defaultAction := range sortedActions { + 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) @@ -629,7 +632,9 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { defaultActions[i] = defaultActionMap } - d.Set("default_action", defaultActions) + if err := d.Set("default_action", defaultActions); err != nil { + return fmt.Errorf("error setting default_action: %s", err) + } return nil } 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 5f44fa8c8..a6edf2293 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 @@ -557,9 +557,11 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err } } - sortedActions := sortActionsBasedonTypeinTFFile("action", rule.Actions, d) - actions := make([]interface{}, len(sortedActions)) - for i, action := range sortedActions { + 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) 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 79b8daf25..0130949d8 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: validation.StringLenBetween(0, 32), + ValidateFunc: validateLbTargetGroupName, }, "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: validation.StringLenBetween(0, 32-resource.UniqueIDSuffixLength), + ValidateFunc: validateLbTargetGroupNamePrefix, }, "port": { 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 0a2425916..d493579ba 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, @@ -196,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 { @@ -284,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 @@ -318,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 52f7f4571..d227ca2f9 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_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go index 3776cc2c0..1c261b2c4 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 @@ -158,6 +158,10 @@ func resourceAwsNetworkAcl() *schema.Resource { Set: resourceAwsNetworkAclEntryHash, }, "tags": tagsSchema(), + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -229,6 +233,7 @@ func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error { d.Set("vpc_id", networkAcl.VpcId) d.Set("tags", tagsToMap(networkAcl.Tags)) + d.Set("owner_id", networkAcl.OwnerId) var s []string for _, a := range networkAcl.Associations { 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 99157218b..6fe843ca7 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_opsworks_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go index bfa11fa1b..e0ef1a265 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, 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 16241ad34..ccbddadce 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,7 +531,7 @@ 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("Error sorting layer_ids attribute: %#v", err) } @@ -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_organizations_organization.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go index 7b4fb8311..0e45120b0 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_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 000000000..e20a9a632 --- /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 000000000..0663b95be --- /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 000000000..44a7203a9 --- /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_proxy_protocol_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go index 5f14be695..094bfbc5b 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 4d1782a3b..2f46a8727 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" @@ -401,6 +400,16 @@ 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) @@ -421,30 +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("kms_key_id"); ok { - opts.KmsKeyId = 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 { @@ -455,25 +477,20 @@ 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{})) + if attr, ok := d.GetOk("preferred_backup_window"); ok { + modifyDbClusterInput.PreferredBackupWindow = aws.String(attr.(string)) + requiresModifyDbCluster = true + } + + if attr, ok := d.GetOk("preferred_maintenance_window"); ok { + modifyDbClusterInput.PreferredMaintenanceWindow = aws.String(attr.(string)) + requiresModifyDbCluster = true } - // 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("db_cluster_parameter_group_name"); ok { - opts.DBClusterParameterGroupName = aws.String(attr.(string)) - } - - if _, ok := d.GetOk("backup_retention_period"); ok { - clusterUpdate = true - } - log.Printf("[DEBUG] RDS Cluster restore from snapshot configuration: %s", opts) err := resource.Retry(1*time.Minute, func() *resource.RetryError { _, err := conn.RestoreDBClusterFromSnapshot(&opts) @@ -488,37 +505,6 @@ 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 backup_retention_period and vpc_security_group_ids" + - "but custom values should be set, will now update after snapshot is restored!") - - d.SetId(identifier) - - 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(identifier), @@ -834,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, @@ -855,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) } @@ -1040,13 +1042,13 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error 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 @@ -1075,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) } } @@ -1120,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 { @@ -1173,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, @@ -1188,29 +1180,24 @@ func resourceAwsRDSClusterDelete(d *schema.ResourceData, meta interface{}) error 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 } } @@ -1220,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 } } @@ -1275,3 +1262,16 @@ var resourceAwsRdsClusterUpdatePendingStates = []string{ "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_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_endpoint.go new file mode 100644 index 000000000..3c24a35ec --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_endpoint.go @@ -0,0 +1,267 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "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" + "github.com/hashicorp/terraform/helper/validation" +) + +const ( + AWSRDSClusterEndpointRetryDelay = 5 * time.Second + AWSRDSClusterEndpointRetryMinTimeout = 3 * time.Second +) + +func resourceAwsRDSClusterEndpoint() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsRDSClusterEndpointCreate, + Read: resourceAwsRDSClusterEndpointRead, + Update: resourceAwsRDSClusterEndpointUpdate, + Delete: resourceAwsRDSClusterEndpointDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_endpoint_identifier": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validateRdsIdentifier, + }, + "cluster_identifier": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validateRdsIdentifier, + }, + "custom_endpoint_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + "READER", + "ANY", + }, false), + }, + "excluded_members": { + Type: schema.TypeSet, + Optional: true, + ConflictsWith: []string{"static_members"}, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "static_members": { + Type: schema.TypeSet, + Optional: true, + ConflictsWith: []string{"excluded_members"}, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsRDSClusterEndpointCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + clusterId := d.Get("cluster_identifier").(string) + endpointId := d.Get("cluster_endpoint_identifier").(string) + endpointType := d.Get("custom_endpoint_type").(string) + + createClusterEndpointInput := &rds.CreateDBClusterEndpointInput{ + DBClusterIdentifier: aws.String(clusterId), + DBClusterEndpointIdentifier: aws.String(endpointId), + EndpointType: aws.String(endpointType), + } + + if v := d.Get("static_members"); v != nil { + createClusterEndpointInput.StaticMembers = expandStringSet(v.(*schema.Set)) + } + if v := d.Get("excluded_members"); v != nil { + createClusterEndpointInput.ExcludedMembers = expandStringSet(v.(*schema.Set)) + } + + _, err := conn.CreateDBClusterEndpoint(createClusterEndpointInput) + if err != nil { + return fmt.Errorf("Error creating RDS Cluster Endpoint: %s", err) + } + + d.SetId(endpointId) + + err = resourceAwsRDSClusterEndpointWaitForAvailable(d.Timeout(schema.TimeoutDelete), d.Id(), conn) + if err != nil { + return err + } + + return resourceAwsRDSClusterEndpointRead(d, meta) +} + +func resourceAwsRDSClusterEndpointRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + input := &rds.DescribeDBClusterEndpointsInput{ + DBClusterEndpointIdentifier: aws.String(d.Id()), + } + log.Printf("[DEBUG] Describing RDS Cluster: %s", input) + resp, err := conn.DescribeDBClusterEndpoints(input) + + if err != nil { + return fmt.Errorf("error describing RDS Cluster Endpoints (%s): %s", d.Id(), err) + } + + if resp == nil { + return fmt.Errorf("Error retrieving RDS Cluster Endpoints: empty response for: %s", input) + } + + var clusterEp *rds.DBClusterEndpoint + for _, e := range resp.DBClusterEndpoints { + if aws.StringValue(e.DBClusterEndpointIdentifier) == d.Id() { + clusterEp = e + break + } + } + + if clusterEp == nil { + log.Printf("[WARN] RDS Cluster Endpoint (%s) not found", d.Id()) + d.SetId("") + return nil + } + + d.Set("cluster_endpoint_identifier", clusterEp.DBClusterEndpointIdentifier) + d.Set("cluster_identifier", clusterEp.DBClusterIdentifier) + d.Set("arn", clusterEp.DBClusterEndpointArn) + d.Set("endpoint", clusterEp.Endpoint) + d.Set("custom_endpoint_type", clusterEp.CustomEndpointType) + + if err := d.Set("excluded_members", flattenStringList(clusterEp.ExcludedMembers)); err != nil { + return fmt.Errorf("error setting excluded_members: %s", err) + } + + if err := d.Set("static_members", flattenStringList(clusterEp.StaticMembers)); err != nil { + return fmt.Errorf("error setting static_members: %s", err) + } + + return nil +} + +func resourceAwsRDSClusterEndpointUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + input := &rds.ModifyDBClusterEndpointInput{ + DBClusterEndpointIdentifier: aws.String(d.Id()), + } + + if v, ok := d.GetOk("custom_endpoint_type"); ok { + input.EndpointType = aws.String(v.(string)) + } + + if attr := d.Get("excluded_members").(*schema.Set); attr.Len() > 0 { + input.ExcludedMembers = expandStringList(attr.List()) + } else { + input.ExcludedMembers = make([]*string, 0) + } + + if attr := d.Get("static_members").(*schema.Set); attr.Len() > 0 { + input.StaticMembers = expandStringList(attr.List()) + } else { + input.StaticMembers = make([]*string, 0) + } + + _, err := conn.ModifyDBClusterEndpoint(input) + if err != nil { + return fmt.Errorf("Error modifying RDS Cluster Endpoint: %s", err) + } + + return resourceAwsRDSClusterEndpointRead(d, meta) +} + +func resourceAwsRDSClusterEndpointDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + input := &rds.DeleteDBClusterEndpointInput{ + DBClusterEndpointIdentifier: aws.String(d.Id()), + } + _, err := conn.DeleteDBClusterEndpoint(input) + if err != nil { + return fmt.Errorf("Error deleting RDS Cluster Endpoint: %s", err) + } + + if err := resourceAwsRDSClusterEndpointWaitForDestroy(d.Timeout(schema.TimeoutDelete), d.Id(), conn); err != nil { + return err + } + + return nil +} + +func resourceAwsRDSClusterEndpointWaitForDestroy(timeout time.Duration, id string, conn *rds.RDS) error { + log.Printf("Waiting for RDS Cluster Endpoint %s to be deleted...", id) + stateConf := &resource.StateChangeConf{ + Pending: []string{"available", "deleting"}, + Target: []string{"destroyed"}, + Refresh: DBClusterEndpointStateRefreshFunc(conn, id), + Timeout: timeout, + Delay: AWSRDSClusterEndpointRetryDelay, + MinTimeout: AWSRDSClusterEndpointRetryMinTimeout, + } + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for RDS Cluster Endpoint (%s) to be deleted: %v", id, err) + } + return nil +} + +func resourceAwsRDSClusterEndpointWaitForAvailable(timeout time.Duration, id string, conn *rds.RDS) error { + log.Printf("Waiting for RDS Cluster Endpoint %s to become available...", id) + + stateConf := &resource.StateChangeConf{ + Pending: []string{"creating"}, + Target: []string{"available"}, + Refresh: DBClusterEndpointStateRefreshFunc(conn, id), + Timeout: timeout, + Delay: AWSRDSClusterEndpointRetryDelay, + MinTimeout: AWSRDSClusterEndpointRetryMinTimeout, + } + + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for RDS Cluster Endpoint (%s) to be ready: %v", id, err) + } + return nil +} + +func DBClusterEndpointStateRefreshFunc(conn *rds.RDS, id string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + emptyResp := &rds.DescribeDBClusterEndpointsOutput{} + + resp, err := conn.DescribeDBClusterEndpoints( + &rds.DescribeDBClusterEndpointsInput{ + DBClusterEndpointIdentifier: aws.String(id), + }) + if err != nil { + if isAWSErr(err, rds.ErrCodeDBClusterNotFoundFault, "") { + return emptyResp, "destroyed", nil + } else if resp != nil && len(resp.DBClusterEndpoints) == 0 { + return emptyResp, "destroyed", nil + } else { + return emptyResp, "", fmt.Errorf("Error on refresh: %+v", err) + } + } + + if resp == nil || resp.DBClusterEndpoints == nil || len(resp.DBClusterEndpoints) == 0 { + return emptyResp, "destroyed", nil + } + + return resp.DBClusterEndpoints[0], *resp.DBClusterEndpoints[0].Status, nil + } +} 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 d39581eff..5bd7c11aa 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 @@ -200,6 +200,12 @@ func resourceAwsRDSClusterInstance() *schema.Resource { ValidateFunc: validateArn, }, + "copy_tags_to_snapshot": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "tags": tagsSchema(), }, } @@ -211,6 +217,7 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ createOpts := &rds.CreateDBInstanceInput{ DBInstanceClass: aws.String(d.Get("instance_class").(string)), + CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), Engine: aws.String(d.Get("engine").(string)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), @@ -367,6 +374,7 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) d.Set("auto_minor_version_upgrade", db.AutoMinorVersionUpgrade) d.Set("availability_zone", db.AvailabilityZone) d.Set("cluster_identifier", db.DBClusterIdentifier) + d.Set("copy_tags_to_snapshot", db.CopyTagsToSnapshot) d.Set("dbi_resource_id", db.DbiResourceId) d.Set("engine_version", db.EngineVersion) d.Set("engine", db.Engine) @@ -461,6 +469,12 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ requestUpdate = true } + if d.HasChange("copy_tags_to_snapshot") { + d.SetPartial("copy_tags_to_snapshot") + req.CopyTagsToSnapshot = aws.Bool(d.Get("copy_tags_to_snapshot").(bool)) + requestUpdate = true + } + if d.HasChange("promotion_tier") { d.SetPartial("promotion_tier") req.PromotionTier = aws.Int64(int64(d.Get("promotion_tier").(int))) 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 1e0d9a971..358abc5e0 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 "" }, }, }, }, 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 b19eb6ab0..285849cc2 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 @@ -902,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 } @@ -912,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 { @@ -924,8 +924,7 @@ func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift. return resource.NonRetryableError(err) }) if err != nil { - return nil, fmt.Errorf("Error deleting Redshift Cluster (%s): %s", - id, err) + return fmt.Errorf("Error deleting Redshift Cluster (%s): %s", id, err) } stateConf := &resource.StateChangeConf{ @@ -936,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_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go index bbd8a58e5..1c91d70bf 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 @@ -120,6 +120,11 @@ func resourceAwsRoute() *schema.Resource { ForceNew: true, }, + "transit_gateway_id": { + Type: schema.TypeString, + Optional: true, + }, + "vpc_peering_connection_id": { Type: schema.TypeString, Optional: true, @@ -138,6 +143,7 @@ func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { "nat_gateway_id", "instance_id", "network_interface_id", + "transit_gateway_id", "vpc_peering_connection_id", } @@ -210,6 +216,20 @@ func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { createOpts.DestinationIpv6CidrBlock = aws.String(v.(string)) } + case "transit_gateway_id": + createOpts = &ec2.CreateRouteInput{ + RouteTableId: aws.String(d.Get("route_table_id").(string)), + TransitGatewayId: aws.String(d.Get("transit_gateway_id").(string)), + } + + if v, ok := d.GetOk("destination_cidr_block"); ok { + createOpts.DestinationCidrBlock = aws.String(v.(string)) + } + + if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { + createOpts.DestinationIpv6CidrBlock = aws.String(v.(string)) + } + case "vpc_peering_connection_id": createOpts = &ec2.CreateRouteInput{ RouteTableId: aws.String(d.Get("route_table_id").(string)), @@ -235,16 +255,15 @@ func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { _, err = conn.CreateRoute(createOpts) - if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - if ec2err.Code() == "InvalidParameterException" { - log.Printf("[DEBUG] Trying to create route again: %q", ec2err.Message()) - return resource.RetryableError(err) - } + if isAWSErr(err, "InvalidParameterException", "") { + return resource.RetryableError(err) + } + if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { + return resource.RetryableError(err) + } + + if err != nil { return resource.NonRetryableError(err) } @@ -312,6 +331,7 @@ func resourceAwsRouteSetResourceData(d *schema.ResourceData, route *ec2.Route) { d.Set("network_interface_id", route.NetworkInterfaceId) d.Set("origin", route.Origin) d.Set("state", route.State) + d.Set("transit_gateway_id", route.TransitGatewayId) d.Set("vpc_peering_connection_id", route.VpcPeeringConnectionId) } @@ -326,6 +346,7 @@ func resourceAwsRouteUpdate(d *schema.ResourceData, meta interface{}) error { "nat_gateway_id", "network_interface_id", "instance_id", + "transit_gateway_id", "vpc_peering_connection_id", } replaceOpts := &ec2.ReplaceRouteInput{} @@ -384,6 +405,12 @@ func resourceAwsRouteUpdate(d *schema.ResourceData, meta interface{}) error { DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), NetworkInterfaceId: aws.String(d.Get("network_interface_id").(string)), } + case "transit_gateway_id": + replaceOpts = &ec2.ReplaceRouteInput{ + RouteTableId: aws.String(d.Get("route_table_id").(string)), + DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), + TransitGatewayId: aws.String(d.Get("transit_gateway_id").(string)), + } case "vpc_peering_connection_id": replaceOpts = &ec2.ReplaceRouteInput{ RouteTableId: aws.String(d.Get("route_table_id").(string)), 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 ce9e8843d..98f0d15b7 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 3a47ec9cd..c6e22501e 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 @@ -681,6 +681,18 @@ func findRecord(d *schema.ResourceData, meta interface{}) (*route53.ResourceReco record = recordSet return false } + + nextRecordName := strings.ToLower(cleanRecordName(aws.StringValue(resp.NextRecordName))) + nextRecordType := strings.ToUpper(aws.StringValue(resp.NextRecordType)) + + if nextRecordName != recordName { + return false + } + + if nextRecordType != recordType { + return false + } + return !lastPage }) 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 b8df2d202..8e60d8ce0 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,18 +1,19 @@ package aws import ( + "bytes" "fmt" "log" "sort" "strings" "time" + "github.com/aws/aws-sdk-go/aws" + "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/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/validation" ) func resourceAwsRoute53Zone() *schema.Resource { @@ -39,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": { @@ -83,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()), - } - if v := d.Get("vpc_id"); v != "" { - req.VPC = &route53.VPC{ - VPCId: aws.String(v.(string)), - VPCRegion: aws.String(meta.(*AWSClient).region), - } - if w := d.Get("vpc_region"); w != "" { - req.VPC.VPCRegion = aws.String(w.(string)) - } - d.Set("vpc_region", req.VPC.VPCRegion) + 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, ok := d.GetOk("delegation_set_id"); ok { - req.DelegationSetId = aws.String(v.(string)) + input.DelegationSetId = aws.String(v.(string)) } - log.Printf("[DEBUG] Creating Route53 hosted zone: %s", *req.Name) - var err error - resp, err := r53.CreateHostedZone(req) + // 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 vpcRegion, ok := d.GetOk("vpc_region"); ok { + vpc.VPCRegion = aws.String(vpcRegion.(string)) + } + + vpcs = []*route53.VPC{vpc} + } + + if len(vpcs) > 0 { + input.VPC = vpcs[0] + } + + 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)), + 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) + } + + 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 resourceAwsGoRoute53Wait(r53, changeRequest) - }, + } } - _, err = wait.WaitForState() - 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 _, ok := d.GetOk("name"); !ok { - d.Set("name", zone.HostedZone.Name) + 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 !*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("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("Error setting name servers for: %s, error: %#v", d.Id(), err) - } + d.Set("comment", "") + d.Set("delegation_set_id", "") + d.Set("name", output.HostedZone.Name) + d.Set("zone_id", cleanZoneID(aws.StringValue(output.HostedZone.Id))) - // 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") - } + var nameServers []string - if len(zone.VPCs) > 0 { - d.Set("vpc_id", zone.VPCs[0].VPCId) - d.Set("vpc_region", zone.VPCs[0].VPCRegion) + if output.DelegationSet != nil { + d.Set("delegation_set_id", cleanDelegationSetId(aws.StringValue(output.DelegationSet.Id))) + + nameServers = aws.StringValueSlice(output.DelegationSet.NameServers) + } + + if output.HostedZone.Config != nil { + d.Set("comment", output.HostedZone.Config.Comment) + + if aws.BoolValue(output.HostedZone.Config.PrivateZone) { + var err error + nameServers, err = getNameServers(d.Id(), d.Get("name").(string), conn) + + 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 + sort.Strings(nameServers) + if err := d.Set("name_servers", nameServers); err != nil { + return fmt.Errorf("error setting name_servers: %s", err) + } + + // 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 associatedVPC == nil { - return fmt.Errorf("VPC: %v is not associated with Zone: %v", d.Get("vpc_id"), d.Id()) - } } - if zone.DelegationSet != nil && zone.DelegationSet.Id != nil { - d.Set("delegation_set_id", cleanDelegationSetId(*zone.DelegationSet.Id)) - } - - 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 @@ -234,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 fmt.Errorf("%s", 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 @@ -387,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_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go index 829898b34..a2010ce09 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go @@ -77,6 +77,11 @@ func resourceAwsRouteTable() *schema.Resource { Optional: true, }, + "transit_gateway_id": { + Type: schema.TypeString, + Optional: true, + }, + "vpc_peering_connection_id": { Type: schema.TypeString, Optional: true, @@ -90,6 +95,11 @@ func resourceAwsRouteTable() *schema.Resource { }, Set: resourceAwsRouteTableHash, }, + + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -193,6 +203,9 @@ func resourceAwsRouteTableRead(d *schema.ResourceData, meta interface{}) error { if r.InstanceId != nil { m["instance_id"] = *r.InstanceId } + if r.TransitGatewayId != nil { + m["transit_gateway_id"] = *r.TransitGatewayId + } if r.VpcPeeringConnectionId != nil { m["vpc_peering_connection_id"] = *r.VpcPeeringConnectionId } @@ -207,6 +220,8 @@ func resourceAwsRouteTableRead(d *schema.ResourceData, meta interface{}) error { // Tags d.Set("tags", tagsToMap(rt.Tags)) + d.Set("owner_id", rt.OwnerId) + return nil } @@ -322,6 +337,10 @@ func resourceAwsRouteTableUpdate(d *schema.ResourceData, meta interface{}) error RouteTableId: aws.String(d.Id()), } + if s := m["transit_gateway_id"].(string); s != "" { + opts.TransitGatewayId = aws.String(s) + } + if s := m["vpc_peering_connection_id"].(string); s != "" { opts.VpcPeeringConnectionId = aws.String(s) } @@ -357,12 +376,16 @@ func resourceAwsRouteTableUpdate(d *schema.ResourceData, meta interface{}) error log.Printf("[INFO] Creating route for %s: %#v", d.Id(), opts) err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.CreateRoute(&opts) + + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + return resource.RetryableError(err) + } + + if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { + return resource.RetryableError(err) + } + if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "InvalidRouteTableID.NotFound" { - return resource.RetryableError(awsErr) - } - } return resource.NonRetryableError(err) } return nil @@ -487,6 +510,10 @@ func resourceAwsRouteTableHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } + if v, ok := m["transit_gateway_id"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + if v, ok := m["vpc_peering_connection_id"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } 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 d59ef9be4..32e504022 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 @@ -112,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": { @@ -294,7 +295,7 @@ func resourceAwsS3Bucket() *schema.Resource { "storage_class": { Type: schema.TypeString, Required: true, - ValidateFunc: validateS3BucketLifecycleStorageClass(), + ValidateFunc: validateS3BucketLifecycleTransitionStorageClass(), }, }, }, @@ -313,7 +314,7 @@ func resourceAwsS3Bucket() *schema.Resource { "storage_class": { Type: schema.TypeString, Required: true, - ValidateFunc: validateS3BucketLifecycleStorageClass(), + ValidateFunc: validateS3BucketLifecycleTransitionStorageClass(), }, }, }, @@ -392,9 +393,11 @@ func resourceAwsS3Bucket() *schema.Resource { Optional: true, ValidateFunc: validation.StringInSlice([]string{ s3.StorageClassStandard, - s3.StorageClassOnezoneIa, - s3.StorageClassStandardIa, s3.StorageClassReducedRedundancy, + s3.StorageClassStandardIa, + s3.StorageClassOnezoneIa, + s3.StorageClassIntelligentTiering, + s3.StorageClassGlacier, }, false), }, "replica_kms_key_id": { @@ -449,7 +452,7 @@ func resourceAwsS3Bucket() *schema.Resource { }, "prefix": { Type: schema.TypeString, - Required: true, + Optional: true, ValidateFunc: validation.StringLenBetween(0, 1024), }, "status": { @@ -460,6 +463,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(), + }, + }, + }, }, }, }, @@ -1315,19 +1338,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) - } else { - return fmt.Errorf("Cannot specify more than one website.") } + + 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) } func resourceAwsS3BucketWebsitePut(s3conn *s3.S3, d *schema.ResourceData, website map[string]interface{}) error { @@ -1754,12 +1775,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)) } @@ -1807,6 +1830,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) } @@ -1817,8 +1863,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) @@ -2068,6 +2121,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) @@ -2213,6 +2286,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()) } 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 7b4bd5bb4..3e681505b 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 @@ -73,6 +73,7 @@ func resourceAwsS3BucketInventory() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ s3.InventoryFormatCsv, s3.InventoryFormatOrc, + s3.InventoryFormatParquet, }, false), }, "bucket_arn": { 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 d67623bde..278823b5d 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 @@ -106,10 +106,12 @@ func resourceAwsS3BucketObject() *schema.Resource { Optional: true, Computed: true, ValidateFunc: validation.StringInSlice([]string{ - s3.StorageClassStandard, - s3.StorageClassReducedRedundancy, - s3.StorageClassOnezoneIa, - s3.StorageClassStandardIa, + s3.ObjectStorageClassStandard, + s3.ObjectStorageClassReducedRedundancy, + s3.ObjectStorageClassGlacier, + s3.ObjectStorageClassStandardIa, + s3.ObjectStorageClassOnezoneIa, + s3.ObjectStorageClassIntelligentTiering, }, false), }, 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 d0f74cef0..ea41b6b7b 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 @@ -19,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": { @@ -86,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 947d26687..edb126870 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 @@ -37,9 +37,20 @@ 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, @@ -92,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_security_group_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go index 2a285bd28..025f364f6 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 @@ -56,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": { @@ -430,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-- } @@ -458,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-- } @@ -471,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-- } @@ -485,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-- } @@ -577,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 { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_account.go new file mode 100644 index 000000000..d0d8d1caf --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_account.go @@ -0,0 +1,68 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/service/securityhub" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSecurityHubAccount() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSecurityHubAccountCreate, + Read: resourceAwsSecurityHubAccountRead, + Delete: resourceAwsSecurityHubAccountDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{}, + } +} + +func resourceAwsSecurityHubAccountCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + log.Print("[DEBUG] Enabling Security Hub for account") + + _, err := conn.EnableSecurityHub(&securityhub.EnableSecurityHubInput{}) + + if err != nil { + return fmt.Errorf("Error enabling Security Hub for account: %s", err) + } + + d.SetId(meta.(*AWSClient).accountid) + + return resourceAwsSecurityHubAccountRead(d, meta) +} + +func resourceAwsSecurityHubAccountRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + + log.Printf("[DEBUG] Checking if Security Hub is enabled") + _, err := conn.GetEnabledStandards(&securityhub.GetEnabledStandardsInput{}) + + if err != nil { + // Can only read enabled standards if Security Hub is enabled + if isAWSErr(err, "InvalidAccessException", "not subscribed to AWS Security Hub") { + d.SetId("") + return nil + } + return fmt.Errorf("Error checking if Security Hub is enabled: %s", err) + } + + return nil +} + +func resourceAwsSecurityHubAccountDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + log.Print("[DEBUG] Disabling Security Hub for account") + + _, err := conn.DisableSecurityHub(&securityhub.DisableSecurityHubInput{}) + + if err != nil { + return fmt.Errorf("Error disabling Security Hub for account: %s", err) + } + + return nil +} 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 d0fd571f7..000000000 --- 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_ses_event_destination.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go index 5317fa223..0c9ef2435 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go @@ -63,7 +63,6 @@ func resourceAwsSesEventDestination() *schema.Resource { Type: schema.TypeSet, Optional: true, ForceNew: true, - MaxItems: 1, ConflictsWith: []string{"kinesis_destination", "sns_destination"}, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ 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 383ab5b4e..ba28eadb7 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_sns_platform_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go index c425c458e..c684e06cf 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 933ca17eb..93284520e 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", @@ -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_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go index 0bfe29f4b..58b6a9d23 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 @@ -151,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) } } 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 55d81f44f..741256a95 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 @@ -17,7 +17,8 @@ import ( ) const ( - MINIMUM_VERSIONED_SCHEMA = 2.0 + MINIMUM_VERSIONED_SCHEMA = 2.0 + SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT = 20 ) func resourceAwsSsmDocument() *schema.Resource { @@ -377,8 +378,6 @@ func setDocumentPermissions(d *schema.ResourceData, meta interface{}) error { log.Printf("[INFO] Setting permissions for document: %s", d.Id()) - // Since AccountIdsToRemove has higher priority than AccountIdsToAdd, - // we filter out accounts from both lists if d.HasChange("permissions") { o, n := d.GetChange("permissions") oldPermissions := o.(map[string]interface{}) @@ -400,31 +399,25 @@ func setDocumentPermissions(d *schema.ResourceData, meta interface{}) error { } } - accountIdsToRemove := make([]string, 0) + // Since AccountIdsToRemove has higher priority than AccountIdsToAdd, + // we filter out accounts from both lists + accountIdsToRemove := make([]interface{}, 0) for _, oldPermissionsAccountId := range oldPermissionsAccountIds { if _, contains := sliceContainsString(newPermissionsAccountIds, oldPermissionsAccountId.(string)); !contains { accountIdsToRemove = append(accountIdsToRemove, oldPermissionsAccountId.(string)) } } - accountIdsToAdd := make([]string, 0) + accountIdsToAdd := make([]interface{}, 0) for _, newPermissionsAccountId := range newPermissionsAccountIds { if _, contains := sliceContainsString(oldPermissionsAccountIds, newPermissionsAccountId.(string)); !contains { accountIdsToAdd = append(accountIdsToAdd, newPermissionsAccountId.(string)) } } - input := &ssm.ModifyDocumentPermissionInput{ - Name: aws.String(d.Get("name").(string)), - PermissionType: aws.String("Share"), - AccountIdsToAdd: aws.StringSlice(accountIdsToAdd), - AccountIdsToRemove: aws.StringSlice(accountIdsToRemove), - } - - log.Printf("[DEBUG] Modifying SSM document permissions: %s", input) - _, err := ssmconn.ModifyDocumentPermission(input) - if err != nil { + if err := modifyDocumentPermissions(ssmconn, d.Get("name").(string), accountIdsToAdd, accountIdsToRemove); err != nil { return fmt.Errorf("error modifying SSM document permissions: %s", err) } + } return nil @@ -478,24 +471,79 @@ func deleteDocumentPermissions(d *schema.ResourceData, meta interface{}) error { log.Printf("[INFO] Removing permissions from document: %s", d.Id()) permission := d.Get("permissions").(map[string]interface{}) - var accountsToRemove []*string + + accountIdsToRemove := make([]interface{}, 0) + if permission["account_ids"] != nil { - accountsToRemove = aws.StringSlice([]string{permission["account_ids"].(string)}) - if strings.Contains(permission["account_ids"].(string), ",") { - accountsToRemove = aws.StringSlice(strings.Split(permission["account_ids"].(string), ",")) + + if v, ok := permission["account_ids"]; ok && v.(string) != "" { + parts := strings.Split(v.(string), ",") + accountIdsToRemove = make([]interface{}, len(parts)) + for i, v := range parts { + accountIdsToRemove[i] = v + } + } + + if err := modifyDocumentPermissions(ssmconn, d.Get("name").(string), nil, accountIdsToRemove); err != nil { + return fmt.Errorf("error removing SSM document permissions: %s", err) + } + + } + + return nil +} + +func modifyDocumentPermissions(conn *ssm.SSM, name string, accountIdsToAdd []interface{}, accountIdstoRemove []interface{}) error { + + if accountIdsToAdd != nil { + + accountIdsToAddBatch := make([]string, 0, SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT) + accountIdsToAddBatches := make([][]string, 0, len(accountIdsToAdd)/SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT+1) + for _, accountId := range accountIdsToAdd { + if len(accountIdsToAddBatch) == SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT { + accountIdsToAddBatches = append(accountIdsToAddBatches, accountIdsToAddBatch) + accountIdsToAddBatch = make([]string, 0, SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT) + } + accountIdsToAddBatch = append(accountIdsToAddBatch, accountId.(string)) + } + accountIdsToAddBatches = append(accountIdsToAddBatches, accountIdsToAddBatch) + + for _, accountIdsToAdd := range accountIdsToAddBatches { + _, err := conn.ModifyDocumentPermission(&ssm.ModifyDocumentPermissionInput{ + Name: aws.String(name), + PermissionType: aws.String("Share"), + AccountIdsToAdd: aws.StringSlice(accountIdsToAdd), + }) + if err != nil { + return err + } } } - permInput := &ssm.ModifyDocumentPermissionInput{ - Name: aws.String(d.Get("name").(string)), - PermissionType: aws.String("Share"), - AccountIdsToRemove: accountsToRemove, - } + if accountIdstoRemove != nil { - _, err := ssmconn.ModifyDocumentPermission(permInput) + accountIdsToRemoveBatch := make([]string, 0, SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT) + accountIdsToRemoveBatches := make([][]string, 0, len(accountIdstoRemove)/SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT+1) + for _, accountId := range accountIdstoRemove { + if len(accountIdsToRemoveBatch) == SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT { + accountIdsToRemoveBatches = append(accountIdsToRemoveBatches, accountIdsToRemoveBatch) + accountIdsToRemoveBatch = make([]string, 0, SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT) + } + accountIdsToRemoveBatch = append(accountIdsToRemoveBatch, accountId.(string)) + } + accountIdsToRemoveBatches = append(accountIdsToRemoveBatches, accountIdsToRemoveBatch) + + for _, accountIdsToRemove := range accountIdsToRemoveBatches { + _, err := conn.ModifyDocumentPermission(&ssm.ModifyDocumentPermissionInput{ + Name: aws.String(name), + PermissionType: aws.String("Share"), + AccountIdsToRemove: aws.StringSlice(accountIdsToRemove), + }) + if err != nil { + return err + } + } - if err != nil { - return fmt.Errorf("Error removing permissions for SSM document: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go index f9d55e8d0..e444233c9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go @@ -14,6 +14,9 @@ func resourceAwsSsmMaintenanceWindow() *schema.Resource { Read: resourceAwsSsmMaintenanceWindowRead, Update: resourceAwsSsmMaintenanceWindowUpdate, Delete: resourceAwsSsmMaintenanceWindowDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { 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 088a8ab35..f9da3fd9e 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,6 +257,8 @@ 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 { 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 5f36af5d9..9941b75eb 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 @@ -6,7 +6,6 @@ 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/hashicorp/terraform/helper/resource" @@ -51,10 +50,19 @@ func resourceAwsSubnet() *schema.Resource { }, "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"availability_zone_id"}, + }, + + "availability_zone_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"availability_zone"}, }, "map_public_ip_on_launch": { @@ -80,6 +88,11 @@ func resourceAwsSubnet() *schema.Resource { }, "tags": tagsSchema(), + + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -88,9 +101,10 @@ func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn createOpts := &ec2.CreateSubnetInput{ - AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - CidrBlock: aws.String(d.Get("cidr_block").(string)), - VpcId: aws.String(d.Get("vpc_id").(string)), + AvailabilityZone: aws.String(d.Get("availability_zone").(string)), + AvailabilityZoneId: aws.String(d.Get("availability_zone_id").(string)), + CidrBlock: aws.String(d.Get("cidr_block").(string)), + VpcId: aws.String(d.Get("vpc_id").(string)), } if v, ok := d.GetOk("ipv6_cidr_block"); ok { @@ -152,30 +166,26 @@ func resourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { d.Set("vpc_id", subnet.VpcId) d.Set("availability_zone", subnet.AvailabilityZone) + d.Set("availability_zone_id", subnet.AvailabilityZoneId) 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", "") } } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "ec2", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("subnet/%s", d.Id()), - } - d.Set("arn", arn.String()) - + d.Set("arn", subnet.SubnetArn) d.Set("tags", tagsToMap(subnet.Tags)) + d.Set("owner_id", subnet.OwnerId) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go new file mode 100644 index 000000000..8d3c821f7 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go @@ -0,0 +1,235 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/transfer" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsTransferServer() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsTransferServerCreate, + Read: resourceAwsTransferServerRead, + Update: resourceAwsTransferServerUpdate, + Delete: resourceAwsTransferServerDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "invocation_role": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + + "url": { + Type: schema.TypeString, + Optional: true, + }, + + "identity_provider_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: transfer.IdentityProviderTypeServiceManaged, + ValidateFunc: validation.StringInSlice([]string{ + transfer.IdentityProviderTypeServiceManaged, + transfer.IdentityProviderTypeApiGateway, + }, false), + }, + + "logging_role": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsTransferServerCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + tags := tagsFromMapTransferServer(d.Get("tags").(map[string]interface{})) + + createOpts := &transfer.CreateServerInput{ + Tags: tags, + } + + identityProviderDetails := &transfer.IdentityProviderDetails{} + if attr, ok := d.GetOk("invocation_role"); ok { + identityProviderDetails.InvocationRole = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("url"); ok { + identityProviderDetails.Url = aws.String(attr.(string)) + } + + if identityProviderDetails.Url != nil || identityProviderDetails.InvocationRole != nil { + createOpts.IdentityProviderDetails = identityProviderDetails + } + + if attr, ok := d.GetOk("identity_provider_type"); ok { + createOpts.IdentityProviderType = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("logging_role"); ok { + createOpts.LoggingRole = aws.String(attr.(string)) + } + + log.Printf("[DEBUG] Create Transfer Server Option: %#v", createOpts) + + resp, err := conn.CreateServer(createOpts) + if err != nil { + return fmt.Errorf("Error creating Transfer Server: %s", err) + } + + d.SetId(*resp.ServerId) + + return resourceAwsTransferServerRead(d, meta) +} + +func resourceAwsTransferServerRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + + descOpts := &transfer.DescribeServerInput{ + ServerId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Describe Transfer Server Option: %#v", descOpts) + + resp, err := conn.DescribeServer(descOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Transfer Server (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + endpoint := fmt.Sprintf("%s.server.transfer.%s.amazonaws.com", d.Id(), meta.(*AWSClient).region) + + d.Set("arn", resp.Server.Arn) + d.Set("endpoint", endpoint) + d.Set("invocation_role", "") + d.Set("url", "") + if resp.Server.IdentityProviderDetails != nil { + d.Set("invocation_role", aws.StringValue(resp.Server.IdentityProviderDetails.InvocationRole)) + d.Set("url", aws.StringValue(resp.Server.IdentityProviderDetails.Url)) + } + d.Set("identity_provider_type", resp.Server.IdentityProviderType) + d.Set("logging_role", resp.Server.LoggingRole) + + if err := d.Set("tags", tagsToMapTransferServer(resp.Server.Tags)); err != nil { + return fmt.Errorf("Error setting tags: %s", err) + } + return nil +} + +func resourceAwsTransferServerUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + updateFlag := false + updateOpts := &transfer.UpdateServerInput{ + ServerId: aws.String(d.Id()), + } + + if d.HasChange("logging_role") { + updateFlag = true + updateOpts.LoggingRole = aws.String(d.Get("logging_role").(string)) + } + + if d.HasChange("invocation_role") || d.HasChange("url") { + identityProviderDetails := &transfer.IdentityProviderDetails{} + updateFlag = true + if attr, ok := d.GetOk("invocation_role"); ok { + identityProviderDetails.InvocationRole = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("url"); ok { + identityProviderDetails.Url = aws.String(attr.(string)) + } + updateOpts.IdentityProviderDetails = identityProviderDetails + } + + if updateFlag { + _, err := conn.UpdateServer(updateOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Transfer Server (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error updating Transfer Server (%s): %s", d.Id(), err) + } + } + + if err := setTagsTransferServer(conn, d); err != nil { + return fmt.Errorf("Error update tags: %s", err) + } + + return resourceAwsTransferServerRead(d, meta) +} + +func resourceAwsTransferServerDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + + delOpts := &transfer.DeleteServerInput{ + ServerId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Delete Transfer Server Option: %#v", delOpts) + + _, err := conn.DeleteServer(delOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting Transfer Server (%s): %s", d.Id(), err) + } + + if err := waitForTransferServerDeletion(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for Transfer Server (%s): %s", d.Id(), err) + } + + return nil +} + +func waitForTransferServerDeletion(conn *transfer.Transfer, serverID string) error { + params := &transfer.DescribeServerInput{ + ServerId: aws.String(serverID), + } + + return resource.Retry(10*time.Minute, func() *resource.RetryError { + _, err := conn.DescribeServer(params) + + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + return nil + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return resource.RetryableError(fmt.Errorf("Transfer Server (%s) still exists", serverID)) + }) +} 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 f6f0b4dff..83f8b6da4 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": { @@ -114,6 +114,11 @@ func resourceAwsVpc() *schema.Resource { }, "tags": tagsSchema(), + + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -159,6 +164,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 +208,18 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { // Tags d.Set("tags", tagsToMap(vpc.Tags)) + d.Set("owner_id", vpc.OwnerId) + + // 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 +285,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 +421,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 +436,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 +545,24 @@ func Ipv6CidrStateRefreshFunc(conn *ec2.EC2, id string, associationId string) re VpcIds: []*string{aws.String(id)}, } resp, err := conn.DescribeVpcs(describeVpcOpts) - 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 - } + + if isAWSErr(err, "InvalidVpcID.NotFound", "") { + return nil, "", nil } - if resp == nil { + if err != nil { + return nil, "", err + } + + 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 +647,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 +722,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_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go index 71cc0ecfb..c4baa0406 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go @@ -57,9 +57,11 @@ func resourceAwsVpcDhcpOptions() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, }, - "tags": { - Type: schema.TypeMap, - Optional: true, + "tags": tagsSchema(), + + "owner_id": { + Type: schema.TypeString, + Computed: true, }, }, } @@ -117,7 +119,7 @@ func resourceAwsVpcDhcpOptionsCreate(d *schema.ResourceData, meta interface{}) e } dos := resp.DhcpOptions - d.SetId(*dos.DhcpOptionsId) + d.SetId(aws.StringValue(dos.DhcpOptionsId)) log.Printf("[INFO] DHCP Options Set ID: %s", d.Id()) // Wait for the DHCP Options to become available @@ -161,6 +163,7 @@ func resourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) err opts := resp.DhcpOptions[0] d.Set("tags", tagsToMap(opts.Tags)) + d.Set("owner_id", opts.OwnerId) for _, cfg := range opts.DhcpConfigurations { tfKey := strings.Replace(*cfg.Key, "-", "_", -1) @@ -182,7 +185,12 @@ func resourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) err func resourceAwsVpcDhcpOptionsUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - return setTags(conn, d) + + if err := setTags(conn, d); err != nil { + return err + } + + return resourceAwsVpcDhcpOptionsRead(d, meta) } func resourceAwsVpcDhcpOptionsDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go index 981ea0a05..6970aa93f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go @@ -87,12 +87,10 @@ func resourceAwsVpcDhcpOptionsAssociationDelete(d *schema.ResourceData, meta int conn := meta.(*AWSClient).ec2conn log.Printf("[INFO] Disassociating DHCP Options Set %s from VPC %s...", d.Get("dhcp_options_id"), d.Get("vpc_id")) - if _, err := conn.AssociateDhcpOptions(&ec2.AssociateDhcpOptionsInput{ + _, err := conn.AssociateDhcpOptions(&ec2.AssociateDhcpOptionsInput{ DhcpOptionsId: aws.String("default"), VpcId: aws.String(d.Get("vpc_id").(string)), - }); err != nil { - return err - } + }) - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go index 18b16d07f..2d2c60c9e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go @@ -213,11 +213,9 @@ func resourceAwsVpcPeeringConnectionModifyOptions(d *schema.ResourceData, meta i } log.Printf("[DEBUG] Modifying VPC Peering Connection options: %#v", req) - if _, err := conn.ModifyVpcPeeringConnectionOptions(req); err != nil { - return err - } + _, err := conn.ModifyVpcPeeringConnectionOptions(req) - return nil + return err } func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error { 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 9a5073c6e..8b82cb991 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 @@ -72,9 +72,10 @@ func resourceAwsVpnConnection() *schema.Resource { Schema: map[string]*schema.Schema{ "vpn_gateway_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"transit_gateway_id"}, }, "customer_gateway_id": { @@ -83,6 +84,13 @@ func resourceAwsVpnConnection() *schema.Resource { ForceNew: true, }, + "transit_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"vpn_gateway_id"}, + }, + "type": { Type: schema.TypeString, Required: true, @@ -297,7 +305,14 @@ func resourceAwsVpnConnectionCreate(d *schema.ResourceData, meta interface{}) er CustomerGatewayId: aws.String(d.Get("customer_gateway_id").(string)), Options: connectOpts, Type: aws.String(d.Get("type").(string)), - VpnGatewayId: aws.String(d.Get("vpn_gateway_id").(string)), + } + + if v, ok := d.GetOk("transit_gateway_id"); ok { + createOpts.TransitGatewayId = aws.String(v.(string)) + } + + if v, ok := d.GetOk("vpn_gateway_id"); ok { + createOpts.VpnGatewayId = aws.String(v.(string)) } // Create the VPN Connection @@ -395,6 +410,7 @@ func resourceAwsVpnConnectionRead(d *schema.ResourceData, meta interface{}) erro // Set attributes under the user's control. d.Set("vpn_gateway_id", vpnConnection.VpnGatewayId) d.Set("customer_gateway_id", vpnConnection.CustomerGatewayId) + d.Set("transit_gateway_id", vpnConnection.TransitGatewayId) d.Set("type", vpnConnection.Type) d.Set("tags", tagsToMap(vpnConnection.Tags)) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go index 083739412..e5a0241a4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go @@ -128,11 +128,7 @@ func resourceAwsVpnConnectionRouteDelete(d *schema.ResourceData, meta interface{ }, } _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return nil + return err } func findConnectionRoute(conn *ec2.EC2, cidrBlock, vpnConnectionId string) (*ec2.VpnStaticRoute, error) { 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 0a1ef9598..ae9a5bba6 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 27f976075..9c62800d6 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 @@ -69,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, @@ -140,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, @@ -157,7 +157,7 @@ func resourceAwsWafByteMatchSetDelete(d *schema.ResourceData, meta interface{}) } 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, @@ -175,7 +175,7 @@ func updateByteMatchSetResource(id string, oldT, newT []interface{}, conn *waf.W } 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 021afbf63..dc5295b84 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 @@ -47,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, @@ -120,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, @@ -137,7 +137,7 @@ func resourceAwsWafGeoMatchSetDelete(d *schema.ResourceData, meta interface{}) e } 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, 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 4eebe1fd9..9c4e1b477 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 b974e81ad..2d3f5f5da 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 @@ -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 ed19133fa..9bfbee72b 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 1ebbc58f6..a09ba6ffc 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 f210138e1..fae17269a 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 @@ -17,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": { @@ -59,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, @@ -141,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, @@ -158,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 a6dd0aa92..803d6ea07 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, @@ -140,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 { @@ -156,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, @@ -172,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 8fa4b8f32..875752473 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 @@ -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, @@ -98,7 +98,7 @@ func resourceAwsWafSizeConstraintSetDelete(d *schema.ResourceData, meta interfac } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteSizeConstraintSetInput{ ChangeToken: token, @@ -114,7 +114,7 @@ func resourceAwsWafSizeConstraintSetDelete(d *schema.ResourceData, meta interfac } 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, 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 e4884486d..ff9bb4d6e 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 @@ -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, @@ -132,7 +132,7 @@ func resourceAwsWafSqlInjectionMatchSetDelete(d *schema.ResourceData, meta inter } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteSqlInjectionMatchSetInput{ ChangeToken: token, @@ -149,7 +149,7 @@ func resourceAwsWafSqlInjectionMatchSetDelete(d *schema.ResourceData, meta inter } 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, @@ -168,7 +168,7 @@ func updateSqlInjectionMatchSetResource(id string, oldT, newT []interface{}, con } 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 a4c130bd1..030162386 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 af1864c08..56dff1191 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 @@ -61,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, @@ -132,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, @@ -149,7 +149,7 @@ func resourceAwsWafXssMatchSetDelete(d *schema.ResourceData, meta interface{}) e } 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, @@ -168,7 +168,7 @@ func updateXssMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WA } 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_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go index 3ef2f56c1..b5cd3828f 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_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go index f478a9482..25cc935a8 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 3af7db109..e82e09798 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 @@ -144,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_web_acl_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go index f076daebc..eb3a9128a 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 8de14fa3f..2712fb155 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 638b8424f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/sort.go +++ /dev/null @@ -1,58 +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, sortAscending bool) []*ec2.Image { - sortedImages := images - if sortAscending { - sort.Sort(imageSort(sortedImages)) - - } else { - 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 7fc6e8f1e..69f582031 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 @@ -13,6 +13,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/aws/aws-sdk-go/service/appmesh" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" @@ -29,7 +30,6 @@ import ( "github.com/aws/aws-sdk-go/service/elasticbeanstalk" elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" "github.com/aws/aws-sdk-go/service/elb" - "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/iot" "github.com/aws/aws-sdk-go/service/kinesis" "github.com/aws/aws-sdk-go/service/lambda" @@ -880,6 +880,10 @@ func flattenStringList(list []*string) []interface{} { return vs } +func flattenStringSet(list []*string) *schema.Set { + return schema.NewSet(schema.HashString, flattenStringList(list)) +} + //Flattens an array of private ip addresses into a []string, where the elements returned are the IP strings e.g. "192.168.0.0" func flattenNetworkInterfacesPrivateIPAddresses(dtos []*ec2.NetworkInterfacePrivateIpAddress) []string { ips := make([]string, 0, len(dtos)) @@ -1349,7 +1353,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 @@ -1376,7 +1380,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 @@ -1407,7 +1411,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 @@ -1449,7 +1453,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)) @@ -1781,29 +1785,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 } @@ -1893,7 +1900,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)) @@ -1908,20 +1916,6 @@ func sortListBasedonTFFile(in []string, d *schema.ResourceData, listName string) return in, fmt.Errorf("Could not find list: %s", listName) } -// This function sorts LB Actions to look like whats found in the tf file -func sortActionsBasedonTypeinTFFile(actionName string, actions []*elbv2.Action, d *schema.ResourceData) []*elbv2.Action { - actionCount := d.Get(actionName + ".#").(int) - for i := 0; i < actionCount; i++ { - currAction := d.Get(actionName + "." + strconv.Itoa(i)).(map[string]interface{}) - for j, action := range actions { - if currAction["type"].(string) == aws.StringValue(action.Type) { - actions[i], actions[j] = actions[j], actions[i] - } - } - } - return actions -} - func flattenApiGatewayThrottleSettings(settings *apigateway.ThrottleSettings) []map[string]interface{} { result := make([]map[string]interface{}, 0, 1) @@ -1978,22 +1972,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{} @@ -2316,11 +2294,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) { @@ -2331,14 +2306,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) @@ -2360,7 +2327,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 @@ -2378,7 +2345,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 @@ -2476,7 +2443,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 @@ -2986,7 +2953,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{} @@ -3022,7 +2989,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{}) @@ -3336,13 +3303,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 @@ -3612,7 +3579,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 } @@ -3624,7 +3591,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 } @@ -3647,7 +3614,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{}) @@ -3709,7 +3676,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 @@ -3807,7 +3774,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 @@ -3823,7 +3790,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 } @@ -3857,7 +3824,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{ @@ -3877,7 +3844,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) @@ -3924,7 +3891,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 } @@ -3957,7 +3924,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 } @@ -3971,9 +3938,9 @@ 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 } @@ -3989,6 +3956,34 @@ func flattenMqBrokerInstances(instances []*mq.BrokerInstance) []interface{} { 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) @@ -4019,7 +4014,7 @@ func flattenResourceLifecycleConfig(rlc *elasticbeanstalk.ApplicationResourceLif return result } -func diffDynamoDbGSI(oldGsi, newGsi []interface{}) (ops []*dynamodb.GlobalSecondaryIndexUpdate, e error) { +func diffDynamoDbGSI(oldGsi, newGsi []interface{}, billingMode string) (ops []*dynamodb.GlobalSecondaryIndexUpdate, e error) { // Transform slices into maps oldGsis := make(map[string]interface{}) for _, gsidata := range oldGsi { @@ -4029,6 +4024,10 @@ func diffDynamoDbGSI(oldGsi, newGsi []interface{}) (ops []*dynamodb.GlobalSecond newGsis := make(map[string]interface{}) for _, gsidata := range newGsi { m := gsidata.(map[string]interface{}) + // validate throughput input early, to avoid unnecessary processing + if e = validateDynamoDbProvisionedThroughput(m, billingMode); e != nil { + return + } newGsis[m["name"].(string)] = m } @@ -4044,7 +4043,7 @@ func diffDynamoDbGSI(oldGsi, newGsi []interface{}) (ops []*dynamodb.GlobalSecond Create: &dynamodb.CreateGlobalSecondaryIndexAction{ IndexName: aws.String(idxName), KeySchema: expandDynamoDbKeySchema(m), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(m), + ProvisionedThroughput: expandDynamoDbProvisionedThroughput(m, billingMode), Projection: expandDynamoDbProjection(m), }, }) @@ -4080,7 +4079,7 @@ func diffDynamoDbGSI(oldGsi, newGsi []interface{}) (ops []*dynamodb.GlobalSecond update := &dynamodb.GlobalSecondaryIndexUpdate{ Update: &dynamodb.UpdateGlobalSecondaryIndexAction{ IndexName: aws.String(idxName), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(newMap), + ProvisionedThroughput: expandDynamoDbProvisionedThroughput(newMap, billingMode), }, } ops = append(ops, update) @@ -4096,7 +4095,7 @@ func diffDynamoDbGSI(oldGsi, newGsi []interface{}) (ops []*dynamodb.GlobalSecond Create: &dynamodb.CreateGlobalSecondaryIndexAction{ IndexName: aws.String(idxName), KeySchema: expandDynamoDbKeySchema(newMap), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(newMap), + ProvisionedThroughput: expandDynamoDbProvisionedThroughput(newMap, billingMode), Projection: expandDynamoDbProjection(newMap), }, }) @@ -4164,6 +4163,11 @@ func flattenDynamoDbPitr(pitrDesc *dynamodb.DescribeContinuousBackupsOutput) []i } func flattenAwsDynamoDbTableResource(d *schema.ResourceData, table *dynamodb.TableDescription) error { + d.Set("billing_mode", dynamodb.BillingModeProvisioned) + if table.BillingModeSummary != nil { + d.Set("billing_mode", table.BillingModeSummary.BillingMode) + } + d.Set("write_capacity", table.ProvisionedThroughput.WriteCapacityUnits) d.Set("read_capacity", table.ProvisionedThroughput.ReadCapacityUnits) @@ -4278,7 +4282,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{ @@ -4293,7 +4297,7 @@ func expandDynamoDbAttributes(cfg []interface{}) []*dynamodb.AttributeDefinition // 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) @@ -4312,16 +4316,45 @@ func expandDynamoDbLocalSecondaryIndexes(cfg []interface{}, keySchemaM map[strin return indexes } -func expandDynamoDbGlobalSecondaryIndex(data map[string]interface{}) *dynamodb.GlobalSecondaryIndex { +func expandDynamoDbGlobalSecondaryIndex(data map[string]interface{}, billingMode string) *dynamodb.GlobalSecondaryIndex { return &dynamodb.GlobalSecondaryIndex{ IndexName: aws.String(data["name"].(string)), KeySchema: expandDynamoDbKeySchema(data), Projection: expandDynamoDbProjection(data), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(data), + ProvisionedThroughput: expandDynamoDbProvisionedThroughput(data, billingMode), } } -func expandDynamoDbProvisionedThroughput(data map[string]interface{}) *dynamodb.ProvisionedThroughput { +func validateDynamoDbProvisionedThroughput(data map[string]interface{}, billingMode string) error { + // if billing mode is PAY_PER_REQUEST, don't need to validate the throughput settings + if billingMode == dynamodb.BillingModePayPerRequest { + return nil + } + + writeCapacity, writeCapacitySet := data["write_capacity"].(int) + readCapacity, readCapacitySet := data["read_capacity"].(int) + + if !writeCapacitySet || !readCapacitySet { + return fmt.Errorf("Read and Write capacity should be set when billing mode is %s", dynamodb.BillingModeProvisioned) + } + + if writeCapacity < 1 { + return fmt.Errorf("Write capacity must be > 0 when billing mode is %s", dynamodb.BillingModeProvisioned) + } + + if readCapacity < 1 { + return fmt.Errorf("Read capacity must be > 0 when billing mode is %s", dynamodb.BillingModeProvisioned) + } + + return nil +} + +func expandDynamoDbProvisionedThroughput(data map[string]interface{}, billingMode string) *dynamodb.ProvisionedThroughput { + + if billingMode == dynamodb.BillingModePayPerRequest { + return nil + } + return &dynamodb.ProvisionedThroughput{ WriteCapacityUnits: aws.Int64(int64(data["write_capacity"].(int))), ReadCapacityUnits: aws.Int64(int64(data["read_capacity"].(int))), @@ -4542,7 +4575,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)), @@ -4687,3 +4720,235 @@ func flattenRdsScalingConfigurationInfo(scalingConfigurationInfo *rds.ScalingCon return []interface{}{m} } + +func expandAppmeshVirtualRouterSpec(vSpec []interface{}) *appmesh.VirtualRouterSpec { + if len(vSpec) == 0 || vSpec[0] == nil { + return nil + } + mSpec := vSpec[0].(map[string]interface{}) + + spec := &appmesh.VirtualRouterSpec{} + + if vServiceNames, ok := mSpec["service_names"].(*schema.Set); ok && vServiceNames.Len() > 0 { + spec.ServiceNames = expandStringSet(vServiceNames) + } + + return spec +} + +func flattenAppmeshVirtualRouterSpec(spec *appmesh.VirtualRouterSpec) []interface{} { + if spec == nil { + return []interface{}{} + } + + mSpec := map[string]interface{}{ + "service_names": flattenStringSet(spec.ServiceNames), + } + + return []interface{}{mSpec} +} + +func expandAppmeshVirtualNodeSpec(vSpec []interface{}) *appmesh.VirtualNodeSpec { + spec := &appmesh.VirtualNodeSpec{} + + if len(vSpec) == 0 || vSpec[0] == nil { + // Empty Spec is allowed. + return spec + } + mSpec := vSpec[0].(map[string]interface{}) + + if vBackends, ok := mSpec["backends"].(*schema.Set); ok && vBackends.Len() > 0 { + spec.Backends = expandStringSet(vBackends) + } + + if vListeners, ok := mSpec["listener"].(*schema.Set); ok && vListeners.Len() > 0 { + listeners := []*appmesh.Listener{} + + for _, vListener := range vListeners.List() { + listener := &appmesh.Listener{} + + mListener := vListener.(map[string]interface{}) + + if vPortMapping, ok := mListener["port_mapping"].([]interface{}); ok && len(vPortMapping) > 0 && vPortMapping[0] != nil { + mPortMapping := vPortMapping[0].(map[string]interface{}) + + listener.PortMapping = &appmesh.PortMapping{} + + if vPort, ok := mPortMapping["port"].(int); ok && vPort > 0 { + listener.PortMapping.Port = aws.Int64(int64(vPort)) + } + if vProtocol, ok := mPortMapping["protocol"].(string); ok && vProtocol != "" { + listener.PortMapping.Protocol = aws.String(vProtocol) + } + } + + listeners = append(listeners, listener) + } + + spec.Listeners = listeners + } + + if vServiceDiscovery, ok := mSpec["service_discovery"].([]interface{}); ok && len(vServiceDiscovery) > 0 && vServiceDiscovery[0] != nil { + mServiceDiscovery := vServiceDiscovery[0].(map[string]interface{}) + + if vDns, ok := mServiceDiscovery["dns"].([]interface{}); ok && len(vDns) > 0 && vDns[0] != nil { + mDns := vDns[0].(map[string]interface{}) + + if vServiceName, ok := mDns["service_name"].(string); ok && vServiceName != "" { + spec.ServiceDiscovery = &appmesh.ServiceDiscovery{ + Dns: &appmesh.DnsServiceDiscovery{ + ServiceName: aws.String(vServiceName), + }, + } + } + } + } + + return spec +} + +func flattenAppmeshVirtualNodeSpec(spec *appmesh.VirtualNodeSpec) []interface{} { + if spec == nil { + return []interface{}{} + } + + mSpec := map[string]interface{}{} + + if spec.Backends != nil { + mSpec["backends"] = flattenStringSet(spec.Backends) + } + + if spec.Listeners != nil { + vListeners := []interface{}{} + + for _, listener := range spec.Listeners { + mListener := map[string]interface{}{} + + if listener.PortMapping != nil { + mPortMapping := map[string]interface{}{ + "port": int(aws.Int64Value(listener.PortMapping.Port)), + "protocol": aws.StringValue(listener.PortMapping.Protocol), + } + mListener["port_mapping"] = []interface{}{mPortMapping} + } + + vListeners = append(vListeners, mListener) + } + + mSpec["listener"] = schema.NewSet(appmeshVirtualNodeListenerHash, vListeners) + } + + if spec.ServiceDiscovery != nil && spec.ServiceDiscovery.Dns != nil { + mSpec["service_discovery"] = []interface{}{ + map[string]interface{}{ + "dns": []interface{}{ + map[string]interface{}{ + "service_name": aws.StringValue(spec.ServiceDiscovery.Dns.ServiceName), + }, + }, + }, + } + } + + return []interface{}{mSpec} +} + +func expandAppmeshRouteSpec(vSpec []interface{}) *appmesh.RouteSpec { + spec := &appmesh.RouteSpec{} + + if len(vSpec) == 0 || vSpec[0] == nil { + // Empty Spec is allowed. + return spec + } + mSpec := vSpec[0].(map[string]interface{}) + + vHttpRoute, ok := mSpec["http_route"].([]interface{}) + if !ok || len(vHttpRoute) == 0 || vHttpRoute[0] == nil { + return nil + } + mHttpRoute := vHttpRoute[0].(map[string]interface{}) + + spec.HttpRoute = &appmesh.HttpRoute{} + + if vHttpRouteAction, ok := mHttpRoute["action"].([]interface{}); ok && len(vHttpRouteAction) > 0 && vHttpRouteAction[0] != nil { + mHttpRouteAction := vHttpRouteAction[0].(map[string]interface{}) + + if vWeightedTargets, ok := mHttpRouteAction["weighted_target"].(*schema.Set); ok && vWeightedTargets.Len() > 0 { + weightedTargets := []*appmesh.WeightedTarget{} + + for _, vWeightedTarget := range vWeightedTargets.List() { + weightedTarget := &appmesh.WeightedTarget{} + + mWeightedTarget := vWeightedTarget.(map[string]interface{}) + + if vVirtualNode, ok := mWeightedTarget["virtual_node"].(string); ok && vVirtualNode != "" { + weightedTarget.VirtualNode = aws.String(vVirtualNode) + } + if vWeight, ok := mWeightedTarget["weight"].(int); ok { + weightedTarget.Weight = aws.Int64(int64(vWeight)) + } + + weightedTargets = append(weightedTargets, weightedTarget) + } + + spec.HttpRoute.Action = &appmesh.HttpRouteAction{ + WeightedTargets: weightedTargets, + } + } + } + + if vHttpRouteMatch, ok := mHttpRoute["match"].([]interface{}); ok && len(vHttpRouteMatch) > 0 && vHttpRouteMatch[0] != nil { + mHttpRouteMatch := vHttpRouteMatch[0].(map[string]interface{}) + + if vPrefix, ok := mHttpRouteMatch["prefix"].(string); ok && vPrefix != "" { + spec.HttpRoute.Match = &appmesh.HttpRouteMatch{ + Prefix: aws.String(vPrefix), + } + } + } + + return spec +} + +func flattenAppmeshRouteSpec(spec *appmesh.RouteSpec) []interface{} { + if spec == nil { + return []interface{}{} + } + + mSpec := map[string]interface{}{} + + if spec.HttpRoute != nil { + mHttpRoute := map[string]interface{}{} + + if spec.HttpRoute.Action != nil && spec.HttpRoute.Action.WeightedTargets != nil { + vWeightedTargets := []interface{}{} + + for _, weightedTarget := range spec.HttpRoute.Action.WeightedTargets { + mWeightedTarget := map[string]interface{}{ + "virtual_node": aws.StringValue(weightedTarget.VirtualNode), + "weight": int(aws.Int64Value(weightedTarget.Weight)), + } + + vWeightedTargets = append(vWeightedTargets, mWeightedTarget) + } + + mHttpRoute["action"] = []interface{}{ + map[string]interface{}{ + "weighted_target": schema.NewSet(appmeshRouteWeightedTargetHash, vWeightedTargets), + }, + } + } + + if spec.HttpRoute.Match != nil { + mHttpRoute["match"] = []interface{}{ + map[string]interface{}{ + "prefix": aws.StringValue(spec.HttpRoute.Match.Prefix), + }, + } + } + + mSpec["http_route"] = []interface{}{mHttpRoute} + } + + return []interface{}{mSpec} +} 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 7a4bfdef1..f716b5c0d 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 5f8a88fa9..7f38ff3a4 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 3b72390ff..f497f3aee 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 3302d7426..0a3006972 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 000000000..9a9854288 --- /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 000000000..17a547c54 --- /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 ef18f33c2..68539f738 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 000000000..f513bab92 --- /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/tagsTransferServer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransferServer.go new file mode 100644 index 000000000..0f9a6d29d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransferServer.go @@ -0,0 +1,118 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/transfer" + "github.com/hashicorp/terraform/helper/schema" +) + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" +func setTagsTransferServer(conn *transfer.Transfer, d *schema.ResourceData) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsTransferServer(tagsFromMapTransferServer(o), tagsFromMapTransferServer(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.UntagResource(&transfer.UntagResourceInput{ + Arn: aws.String(d.Get("arn").(string)), + TagKeys: k, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.TagResource(&transfer.TagResourceInput{ + Arn: aws.String(d.Get("arn").(string)), + 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 diffTagsTransferServer(oldTags, newTags []*transfer.Tag) ([]*transfer.Tag, []*transfer.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 []*transfer.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 tagsFromMapTransferServer(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapTransferServer(m map[string]interface{}) []*transfer.Tag { + result := make([]*transfer.Tag, 0, len(m)) + for k, v := range m { + t := &transfer.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredTransferServer(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapTransferServer(ts []*transfer.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredTransferServer(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 tagIgnoredTransferServer(t *transfer.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/utils.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go index 21c3aab7e..b701ddbea 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 6eb63cd78..c3eab5e22 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,7 +12,6 @@ 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/s3" "github.com/aws/aws-sdk-go/service/waf" @@ -22,6 +21,25 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) +// 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 + } +} + // validateTypeStringNullableBoolean provides custom error messaging for TypeString booleans // Some arguments require three values: true, false, and "" (unspecified). // This ValidateFunc returns a custom message since the message with @@ -44,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) { @@ -270,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 { @@ -340,6 +356,23 @@ func validateCloudWatchLogResourcePolicyDocument(v interface{}, k string) (ws [] return } +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 + } + 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 + } +} + func validateCloudWatchEventTargetId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 64 { @@ -456,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) @@ -597,11 +644,12 @@ func validateS3BucketLifecycleTimestamp(v interface{}, k string) (ws []string, e return } -func validateS3BucketLifecycleStorageClass() schema.SchemaValidateFunc { +func validateS3BucketLifecycleTransitionStorageClass() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ - s3.TransitionStorageClassOnezoneIa, - s3.TransitionStorageClassStandardIa, s3.TransitionStorageClassGlacier, + s3.TransitionStorageClassStandardIa, + s3.TransitionStorageClassOnezoneIa, + s3.TransitionStorageClassIntelligentTiering, }, false) } @@ -667,7 +715,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)) @@ -679,7 +728,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 { @@ -695,7 +745,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 @@ -947,8 +997,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 } @@ -959,8 +1009,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 } @@ -1132,7 +1182,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)) } @@ -1145,7 +1195,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)) } @@ -1162,7 +1212,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)) } @@ -1179,7 +1229,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)) } @@ -1196,7 +1246,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)) } @@ -1214,7 +1264,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 } @@ -1291,23 +1341,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 { @@ -1335,7 +1368,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 } @@ -1351,7 +1384,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 } @@ -1367,7 +1400,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 } @@ -1433,7 +1466,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 } @@ -1449,7 +1482,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 } @@ -1465,7 +1498,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 } @@ -1480,7 +1513,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 } @@ -1516,7 +1549,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 @@ -1526,6 +1559,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}$)", @@ -1624,7 +1670,7 @@ func validateIoTTopicRuleFirehoseSeparator(v interface{}, s string) ([]string, [ return nil, nil } - return nil, []error{fmt.Errorf("Separator must be one of ',' (comma), '\\t' (tab) '\\n' (newline) or '\\r\\n' (Windows newline)")} + 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) { @@ -1632,7 +1678,7 @@ func validateCognitoRoleMappingsAmbiguousRoleResolutionAgainstType(v map[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 @@ -1659,7 +1705,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)) } @@ -1667,7 +1713,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) @@ -1678,15 +1725,6 @@ 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", @@ -1743,7 +1781,7 @@ func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { return nil } -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 @@ -1764,22 +1802,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) { @@ -1797,7 +1819,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 } @@ -1992,3 +2014,69 @@ func validateCloudFrontPublicKeyNamePrefix(v interface{}, k string) (ws []string } 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 52d7f0d0b..b9e6403ce 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 2b14b01bc..3de972aa2 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 @@ -11,14 +11,13 @@ import ( 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 { @@ -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/modules.txt b/vendor/modules.txt index 637ca1402..c89f1a000 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -60,7 +60,7 @@ github.com/apparentlymart/go-textseg/textseg github.com/armon/circbuf # github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 github.com/armon/go-radix -# github.com/aws/aws-sdk-go v1.15.55 +# github.com/aws/aws-sdk-go v1.16.4 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/awserr github.com/aws/aws-sdk-go/service/dynamodb @@ -71,6 +71,7 @@ github.com/aws/aws-sdk-go/internal/sdkio github.com/aws/aws-sdk-go/aws/awsutil 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 @@ -91,6 +92,7 @@ github.com/aws/aws-sdk-go/service/acm github.com/aws/aws-sdk-go/service/acmpca github.com/aws/aws-sdk-go/service/apigateway github.com/aws/aws-sdk-go/service/applicationautoscaling +github.com/aws/aws-sdk-go/service/appmesh github.com/aws/aws-sdk-go/service/appsync github.com/aws/aws-sdk-go/service/athena github.com/aws/aws-sdk-go/service/autoscaling @@ -112,10 +114,12 @@ 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/databasemigrationservice +github.com/aws/aws-sdk-go/service/datasync github.com/aws/aws-sdk-go/service/dax 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/ec2 github.com/aws/aws-sdk-go/service/ecr github.com/aws/aws-sdk-go/service/ecs @@ -138,6 +142,7 @@ github.com/aws/aws-sdk-go/service/iam 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 @@ -154,6 +159,7 @@ github.com/aws/aws-sdk-go/service/rds github.com/aws/aws-sdk-go/service/redshift github.com/aws/aws-sdk-go/service/route53 github.com/aws/aws-sdk-go/service/secretsmanager +github.com/aws/aws-sdk-go/service/securityhub github.com/aws/aws-sdk-go/service/servicecatalog github.com/aws/aws-sdk-go/service/servicediscovery github.com/aws/aws-sdk-go/service/ses @@ -165,9 +171,11 @@ github.com/aws/aws-sdk-go/service/ssm github.com/aws/aws-sdk-go/service/storagegateway github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/swf +github.com/aws/aws-sdk-go/service/transfer 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/aws/aws-sdk-go/internal/ini github.com/aws/aws-sdk-go/internal/shareddefaults github.com/aws/aws-sdk-go/internal/sdkrand github.com/aws/aws-sdk-go/private/protocol/query @@ -175,6 +183,7 @@ github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil github.com/aws/aws-sdk-go/internal/sdkuri github.com/aws/aws-sdk-go/aws/corehandlers github.com/aws/aws-sdk-go/aws/credentials/endpointcreds +github.com/aws/aws-sdk-go/aws/credentials/processcreds github.com/aws/aws-sdk-go/aws/csm github.com/aws/aws-sdk-go/private/protocol/restjson github.com/aws/aws-sdk-go/private/protocol/ec2query @@ -216,8 +225,6 @@ github.com/dimchansky/utfbom github.com/dylanmei/iso8601 # github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 github.com/dylanmei/winrmtest -# github.com/go-ini/ini v1.25.4 -github.com/go-ini/ini # github.com/go-test/deep v1.0.1 github.com/go-test/deep # github.com/gogo/protobuf v0.0.0-20180821102207-98f6aa8b3bcf @@ -373,7 +380,7 @@ github.com/hashicorp/vault/helper/compressutil github.com/hashicorp/yamux # github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a github.com/jen20/awspolicyequivalence -# github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 +# github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af github.com/jmespath/go-jmespath # github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 github.com/joyent/triton-go @@ -455,7 +462,7 @@ github.com/spf13/afero github.com/spf13/afero/mem # github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d github.com/svanharmelen/jsonapi -# github.com/terraform-providers/terraform-provider-aws v1.41.0 +# github.com/terraform-providers/terraform-provider-aws v1.52.0 github.com/terraform-providers/terraform-provider-aws/aws # github.com/terraform-providers/terraform-provider-openstack v0.0.0-20170616075611-4080a521c6ea github.com/terraform-providers/terraform-provider-openstack/openstack